我有以下的CSS和HTML。除了字体粗体外,所有样式都应用。以这种方式可以设置输入风格吗?风格输入字体粗体?
<span>
<input type="submit">
</span>
span input {
background: none;
border: none;
font-weight: bold;
text-decoration: underline;
}
我有以下的CSS和HTML。除了字体粗体外,所有样式都应用。以这种方式可以设置输入风格吗?风格输入字体粗体?
<span>
<input type="submit">
</span>
span input {
background: none;
border: none;
font-weight: bold;
text-decoration: underline;
}
这是应该工作的样式代码。因为它是封闭在<style>
标签
<head>
<style type="text/css">
.inputClass{
font-weight: bold;
}
</style>
</head>
<body>
<form method="post.php" action="POST">
<input id="input" class="inputClass">
</form>
</body>
这会工作,而不是原来的代码。
让我知道这是否适用于您或您正在寻找的解决方案。
字体重量后缺少括号。 – Jerryf
谢谢@Jerryf,编辑。 –
这应该只是一个原始的代码应该工作。这个问题不会对未来的访问者有所帮助,除非会澄清阻止原始代码运行的原因,例如没有披露的样式表。 –
为什么不试试呢? – mash
[不知道你有什么问题,它看起来很大胆](http://jsfiddle.net/7n7Re/)。 – zzzzBov
适合我的作品,你确定没有其他风格重写吗? – Jerryf