我正在尝试通过下面的这种方式为输入提供粗体字体,但它不起作用..
<html>
<head>
</head>
<body>
<style type=”text/css”>
.jander2{
font-weight: bold;
}
</style>
<form method="post" action="somepage">
<input id="jander" class="jander2">
</form>
</body>
</html>
最佳答案
你的 <style>
应该在 <head>
部分:
<html>
<head>
<style type="text/css">
.jander2{
font-weight: bold;
}
</style>
</head>
<body>
<form method="post" action="somepage">
<input id="jander" class="jander2">
</form>
</body>
</html>
编辑: 为了让评论者满意:只使用标准双引号,不要像在 <style>
中那样使用特殊的弯引号标签。
关于css - 只是想给输入文本加粗字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5408292/