您的位置:首页 > Web前端 > HTML

HTML 学习笔记(二)frameset、frame、iframe、#……id、.……class、<link rel=……、url("……")

2013-04-19 13:35 886 查看
……
</head>
<frameset rows = "20%, 50%, 30%" frameborder="0" framespacing="1">
<frame src="111.html">
<frameset cols = "35%,65%" frameborder="0" bordercolor="#FF0033">
<frame src="aaa.html">
<frame src="bbb.html">
</frameset>
<frame src="222.html">
</frameset><noframes></noframes>
</html>


<iframe src="sss.html" scrolling="no">


id选择器

#red {color:red;}
#green {color:green;}<
……
<p id="red">这个段落是红色。</p>
<p id="green">这个段落是绿色。</p>


类选择器

.center {text-align: center}
<h1 class="center">
This heading will be center-aligned
</h1>
<p class="center">
This paragraph will also be center-aligned.
</p>


派生选择器

li strong {
font-style: italic;
font-weight: normal;
}


元素/类型选择器

html {color:black;}
h1 {color:blue;}
h2 {color:silver;}
<p><strong>我是粗体字,不是斜体字,因为我不在列表当中,所以这个规则对我不起作用</strong></p>

<ol>
<li><strong>我是斜体字。这是因为 strong 元素位于 li 元素内。</strong></li>
<li>我是正常的字体。</li>
</ol>


外部样式表

<head><link rel="stylesheet" type="text/css" href="mystyle.css" /></head>


内部样式表

<head>
<style type="text/css">
hr {color: sienna;}
p {margin-left: 20px;}
body {background-image: url("images/back40.gif");}
</style>
</head>


内联样式

<p style="color: sienna; margin-left: 20px">
This is a paragraph
</p>


                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐