无论我做什么,我的CSS都不会设置标签标签。
CSS:
label {
font-family: 'Lucida Grande';
}
HTML:
<div class="contact-form">
<form action="post">
<label for="name">Name:<input type="text" id="name" class="text" /></label>
<label for="email">Email:<input type="text" id="email" class="text" /></label>
<label for="message">Message:<textarea id="message"></textarea></label>
<input type="submit" class="submit" value="Send Message" />
</form>
</div>
猜猜是什么?不是LUCIDA GRANDE。
答案 0 :(得分:4)
也许是因为reset.css
覆盖了style.css
?
<!-- Stylesheets -->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/reset.css" rel="stylesheet" type="text/css" media="all" />
label
选项卡包含在reset.css
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}