打开网站显示404,北京公司请做网站工资,建筑设计网站免费,站长seo查询属性的值大于一个单词#xff0c;要加上引号。 外部样式表link href mycss.css typetext/css rel stylesheethref是css文件#xff0c;类型是text/css,rel是当前文档与外部文档的关系。 内部样式表stylebody{color:re… 属性的值大于一个单词要加上引号。 外部样式表 link href mycss.css typetext/css rel stylesheethref是css文件类型是text/css,rel是当前文档与外部文档的关系。 内部样式表 stylebody{color:red;}/style 对html内部的标签进行样式化。 1. 选择器分组 h1, h2, p{color: red;
} 表示h1h2p标签的文本颜色全是红色的。 2. 继承 h1{color: red;
}
body{color: bisque;
} 标签有单独自己的颜色显示自己的没有的显示body的。 3. 派生选择器 可以对派生的标签进行更改样式而不影响其他的。 p strongthis is p strong/strong/p
ullistrongthis is li strong/strong/li
/ul
h1strongthis is h1 strong /strong/h1
h2strongthis is h2 strong /strong/h2 p strong{color:red;}
li strong{color:blue;
}
strong{color:yellow;
} 结果第一个是红色第二个是蓝色其余两个是黄色。转载于:https://www.cnblogs.com/pjc20/p/7707658.html