css的三种样式表:行间样式表,内部样式表,外边样式表。各有什么区别???
<div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在HTML中引入CSS共有三种方式:</p>(1)行内样式表<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">行内样式<span style="color: black;">便是</span>把样式写在HTML元素里面,用style属性声明样式。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">举个栗子:</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;"><!DOCTYPE html></span>
<span style="color: black;"><</span><span style="color: black;">html</span> <span style="color: black;">xmlns</span><span style="color: black;">=</span><span style="color: black;">"http://www.w3.org/1999/xhtml"</span><span style="color: black;">></span>
<span style="color: black;"><</span><span style="color: black;">head</span><span style="color: black;">></span>
<span style="color: black;"><</span><span style="color: black;">title</span><span style="color: black;">></</span><span style="color: black;">title</span><span style="color: black;">></span>
<span style="color: black;"></</span><span style="color: black;">head</span><span style="color: black;">></span>
<span style="color: black;"><</span><span style="color: black;">body</span><span style="color: black;">></span>
<span style="color: black;"><</span><span style="color: black;">p</span> <span style="color: black;">style</span><span style="color: black;">=</span><span style="color: black;">"color:Red; "</span><span style="color: black;">></span>天空未蓝<span style="color: black;"></</span><span style="color: black;">p</span><span style="color: black;">></span><span style="color: black;"><!--设置文字颜色为红色--></span>
<span style="color: black;"></</span><span style="color: black;">body</span><span style="color: black;">></span>
<span style="color: black;"></</span><span style="color: black;">html</span><span style="color: black;">></span>
</div>(2)内部样式表<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">内部样式<span style="color: black;">便是</span>把CSS代码写在HTML文件里面,<span style="color: black;">区别</span>于行内样式,它是把CSS代码集中写在HTML文件的头部,<span style="color: black;">便是</span><head></head>标签里面,用<style></style>标签注明。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">举个栗子:</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;"><!DOCTYPE html></span>
<span style="color: black;"><</span><span style="color: black;">html</span> <span style="color: black;">xmlns</span><span style="color: black;">=</span><span style="color: black;">"http://www.w3.org/1999/xhtml"</span><span style="color: black;">></span>
<span style="color: black;"><</span><span style="color: black;">head</span><span style="color: black;">></span>
<span style="color: black;"><</span><span style="color: black;">meta</span> <span style="color: black;">http-equiv</span><span style="color: black;">=</span><span style="color: black;">"Content-Type"</span> <span style="color: black;">conte</span>
</div>
</span></div>
我完全赞同你的观点,思考很有深度。 你的见解真是独到,让我受益良多。 谷歌网站排名优化 http://www.fok120.com/ 楼主发的这篇帖子,我觉得非常有道理。
页:
[1]