我有以下的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