gpt4 book ai didi

css - 未应用级联样式表

转载 作者:太空宇宙 更新时间:2023-11-03 23:24:50 25 4
gpt4 key购买 nike

我正在使用 Visual Developer 2008 Express Edition

样式表.css

body {
font-size: 12px;
color: blue;
font-family: arial, helvetica, verdana, sans-serif;
text-decoration: underline;
}
.button{
font-weight: bold;
font-size: 14px;
color: red;
background-color: yellow;
font-family: arial, helvetica, verdana, sans-serif;
}
.label{
font-weight: bold;
font-size: 18px;
color: green;
font-family: arial, helvetica, verdana, sans-serif;
}

CssDemo.aspx

enter image description here

当我在浏览器 (IE 10) 中查看 CssDemo.aspx 时,我得到了

enter image description here

为什么 .button 和 .label 不覆盖 CSS 中的正文?

最佳答案

CSS 中的点 . 在 HTML 中表示类,如果你想直接给标签设置样式,在 CSS 中留下点。

button {...}
label {...}

或使用您的 ID

#Button1 {...}
#Label1 {...}

关于css - 未应用级联样式表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27451993/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com