6.30(HTML)
来源:互联网 发布:呼吸阀计算软件 编辑:程序博客网 时间:2024/05/01 23:48
1. 五种标签练习
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<!--分组选择,并且可以有默认选项-->
<select>
<optgroup label="语言">
<option>java</option>
<option selected="selected">ios</option>
<option>c++</option>
</optgroup>
<optgroup label="水果">
<option>苹果</option>
<option>梨子</option>
<option>橘子</option>
</optgroup>
</select>
<fieldset>
<legend>health inf</legend>
height:<input type="text">
weigth:<input type="text">
</fieldset>
<input type="button" value="I AM BUTTON">
<button>button</button>
<input type="reset">
<input type="submit">
</body>
</html>
(2)内联嵌套(frameset代替了body)
1. 内联嵌套:index3.html中嵌套3.2index.html, 3.2index.html
中嵌套3.3index.html, 3.3index.html
中嵌套3.4index.html
index3.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<!--
<frameset rows="20%,80%">
<frame src="3.2index.html"></frame>
<frame src="3.3index.html"></frame>
</frameset>
-->
<iframe src="3.2index.html " width="800px" height="800px"></iframe>
</html>
3.2index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body bgcolor="red">
<iframe src="3.3index.html " width="500px" height="500px"></iframe>
</body>
</html>
3.3index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body bgcolor="yellow">
<iframe src="3.4index.html " width="100px" height="100px"></iframe>
</body>
</html>
3.4index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body bgcolor="yellow">
</body>
</html>
(3)嵌套:页面分割(2:8)
. 页面框架分割
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<frameset rows="20%,80%">
<frame src="3.2index.html"></frame>
<frame src="3.3index.html"></frame>
</frameset>
(3)特殊格式
(4)CSS样式嵌入
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style type="text/css">
body{
background-image:url(4.bmp);
background-repeat: repeat-x;
background-position:left (0px,0px);
background-attachment: fixed;
background-size: (500px,500px);
}
h1{
font-size: 18px;
color: blue;
}
#hh{
color: yellow;
}
#pp{
color:green;
}
.p1{
color: blue;
}
div h1{
color: gray;
}
.kk{
color: white;
}
[title=tt]
{
color:white;
}
</style>
</head>
<body>
<!--id通过#号,class通过.-->
<!--id不可以重名 class可以重名-->
<h1>hello world!</h1>
<h1 style="collor:yellow">hahahahaha</h1>
<!---->
<h1 id="hh">hahahahaha</h1>
<p id="pp" class="1">喝水!!!!!!!!</p>
<p class="p1">喝水!!!!!!!!</p>
<h1>hello world!</h1>
<!--派生可以改变父类的样式-->
<div>
<h1>hello world!</h1>
</div>
<p class="kk">喝水lalalala!!!!!!!!</p>
<link rel="stylesheet" type="text/css" href="index6.css">
<p>cdsafdsfadsfdsafds</p>
<p title="tt">IE3</p>
</body>
</html>
派生:
div h1{
color: gray;
}
<h1>hello world!</h1>
<!--派生可以改变父类的样式-->
<div>
<h1>hello world!</h1>
</div>
CSS外联样式
Index6.css
p {height:50px; border:1px solid #000; backgroundcolor:#fff; margin-top:50px;
margin-bottom:30px;}
index.html
<body>
<!--id通过#号,class通过.-->
<!--id不可以重名 class可以重名-->
<h1>hello world!</h1>
<h1 style="collor:yellow">hahahahaha</h1>
<!---->
<h1 id="hh">hahahahaha</h1>
<p id="pp" class="1">喝水!!!!!!!!</p>
<p class="p1">喝水!!!!!!!!</p>
<h1>hello world!</h1>
<!--派生可以改变父类的样式-->
<div>
<h1>hello world!</h1>
</div>
<p class="kk">喝水lalalala!!!!!!!!</p>
<link rel="stylesheet" type="text/css" href="index6.css">
<p>cdsafdsfadsfdsafds</p>
</body>
</html>
(5)CSS背景样式
(6)
body{
background-image:url(4.bmp);
background-repeat: repeat-x;
background-position:(0px,0px);<!—可以将图片全部显示à
background-attachment: fixed;
(7)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style type="text/css">
body{
text-transform: uppercase;
}
h1{
color: red;
direction: rtl;
text-align: left;
text-decoration: line-through;
unicode-bidi:
text-transform:capitalize;
text-indent: 2em;
word-spacing: 5px;
}
</head>
</style>
<body>
fgfdgfdgfdsgfd
<h1>fsfdsfdsfdsfdsdfdsfdsfdsfds</h1>
</body>
</html>
- 6.30(HTML)
- html
- html
- html
- HTML
- HTML
- html
- html
- html
- html
- HTML
- HTML
- Html
- html
- HTML
- html
- HTML
- HTML
- struts结果类型
- Java - HashMap
- 身份证号码验证
- GUI编程 鼠标事件和键盘事件
- Linux学习笔记一
- 6.30(HTML)
- 第一次想使用插件,就看看啦!jquery-confirm
- httputils用法
- modal模态框
- nvl函数
- iOS PureLayout的基本使用(一)
- ORACLE频繁被锁
- ios调用unix 网络编程的socket 接口实行UDP通信, 锁屏后解屏会闪退的解决方法
- c++引用包装器