前端 html  input标签 的placeholder属性  标签上显示内容

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div style="width: 600px;margin: auto">
<input type="text" placeholder="请输入关键字">
</div> </body>
</html>

一输入文本内容 没有了

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="x-ua-compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Title</title>
</head>
<body>
<div>
<form>
<div>
<label for="user">用户名:</label>
<input id="user" name="username" type="text" placeholder="请输入用户名">
</div> <div>
<label for="pwd">密码:</label>
<input id="pwd" name="password" type="password" placeholder="请输入密码">
</div>
</form>
</div>
</body>
</html>

前端 html input标签 placeholder属性 标签上显示内容的更多相关文章

  1. input 的 placeholder属性在IE8下的兼容处理

    placeholder是input标签的新属性,在使用的时候有两个问题: 1.IE8 下不兼容 处理思路: 如果浏览器不识别placeholder属性,给input添加类名placeholder,模仿 ...

  2. Hmtl5 <input>中placeholder属性(新属性)

    Hmtl5 <input>中placeholder属性(新属性) 一.定义和用法 placeholder 属性提供可描述输入字段预期值的提示信息(hint). 该提示会在输入字段为空时显示 ...

  3. iview+vue 表格任一项实现鼠标划上显示内容

    在新版本的iview中,表格新增了tooltip功能: 但做项目时并不是新的iview版本,又不想升级,如何才能实现当内容过多鼠标划上显示内容?下边是我做项目时的改动: { // fixed: 'le ...

  4. 解决input标签placeholder属性浏览器兼容性问题的一种方法

    为文本框input添加文字输入提示,H5为input提供了一个placeholder属性.在支持H5的浏览器中,用此属性设置输入提示,简单方便,但是对于IE8以下版本,都不支持placeholder属 ...

  5. 修改 input / textarea placeholder 属性的颜色和字体大小

    话不多说,直接上代码: input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { color: #666; fon ...

  6. 前端 HTML form表单标签 input标签 type属性 file 上传文件

     加上上传文件功能 input type='file' - 依赖form表单里一个属性 enctype="multipart/form-data" 加上这个属性表示把你上次文件一点 ...

  7. ie6下使用js替换img标签src属性图片不显示的错误

    首先,我必须再次强调一下,F-U-C-K I-E! 其次,简单阐述一下这个bug的出现的情况.页面中有个<a href=”javascript:void(0)” onclick=”swapImg ...

  8. ie8不兼容input的placeholder属性但是要实现其效果的方法

    通过学习前辈的思想,个人想法整理如下: 通过两个元素标签,仿造出placeholder的内容 使用position定位好两个元素标签 第一要隐藏两个元素标签display:none,在<!--[ ...

  9. angular自定义指令解决IE89不支持input的placeholder属性

    下面代码实测通过,直接copy到本地运行即可. <!DOCTYPE html> <html> <head> <meta charset="UTF-8 ...

随机推荐

  1. 微信公众号access_token的获取与存储

    如果是一个用户触发,那么只要将access_token放在数据库,文件,nosql就行,取时判断时间是否过期,过期重新去微信获取再放入. 如果是很多用户,多进程并发,特别是分布式那种架构呢?进程A判断 ...

  2. codeblocks编码设置

    注意编码统一,即文件编码和编译时的编码统一即可. codeblock13.12下: 文件编码: setting -> editor ->general setting -> othe ...

  3. C# GIF图片的分解以及合成

    dll下载的地址 http://www.codeproject.com/Articles/11505/NGif-Animated-GIF-Encoder-for-NET   使用主要调用的是Compo ...

  4. <转>Python: and、or以及and-or

    转自 http://www.cnblogs.com/BeginMan/p/3197123.html 一.and: 在Python 中,and 和 or 执行布尔逻辑演算,如你所期待的一样,但是它们并不 ...

  5. Android设计和开发系列第二篇:Action Bar(Design)

    Action Bar The action bar is a dedicated piece of real estate at the top of each screen that is gene ...

  6. css零零散散的笔记

    1.div根据内容自适应大小 效果图: html: <body> <div class="parent"> <div class="chil ...

  7. Artech的MVC4框架学习——第二章URL路由

    总结:HttpModule 和HttpHandler是Asp.net管道的两个重要组件.请求最终处理通过HttpHandler完成.MVC就是通过名为MvcHandler自定义HttpHandler现 ...

  8. JavaScript—当前时间

    当前时间-倒计时下载 效果: 代码: <!doctype html> <html> <head> <meta http-equiv="Content ...

  9. 【CF878D】Magic Breeding bitset

    [CF878D]Magic Breeding 题意:有k个物品,每个物品有n项属性值,第i个人的第j个属性值为aij,有q个操作: 1 x y 用x和y合成一个新的物品,新物品的编号是++k,新物品的 ...

  10. yii---where该如何使用

    简单示例yii 的where使用方法: $where = ['post_id'=>$postId]; //$list = ForumThreadPost::find()->where($w ...