在以下示例中
http://twitter.github.com/bootstrap/base-css.html#forms
有一个带有文字“Type something ...”的文本字段,点击后会消失
我在
下面加了几乎相同的代码<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet">
<link href="http://twitter.github.com/bootstrap/assets/css/docs.css" rel="stylesheet">
</head>
<body>
<input type="text" class="span3" placeholder="Type something…"> <span class="help-inline">Associated help text!</span>the
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script src="http://twitter.github.com/bootstrap/1.4.0/bootstrap-modal.js"></script>
</body>
</html>
有人可以告诉我为什么我的文字在点击后不会消失吗?
答案 0 :(得分:2)
我正在使用Chrome,点击后文字不会消失。它写入后就消失了。删除输入时,占位符将再次出现。