110 lines
2.5 KiB
HTML
110 lines
2.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>CSS - 盒子模型</title>
|
|
<style>
|
|
@font-face {
|
|
font-family: "FatDog";
|
|
src: url('fonts/chunkfive.ttf');
|
|
}
|
|
body {
|
|
width: 960px;
|
|
margin: 0 auto;
|
|
}
|
|
.ms {
|
|
letter-spacing: 10px;
|
|
width: 320px;
|
|
height: 100px;
|
|
border: 5px dotted gray;
|
|
line-height: 100px;
|
|
text-align: center;
|
|
margin: 10px auto;
|
|
text-decoration: underline;
|
|
text-shadow: 2px 2px gray;
|
|
font-size: 400%;
|
|
}
|
|
.one {
|
|
text-indent: 60px;
|
|
}
|
|
.two {
|
|
text-indent: 40px;
|
|
}
|
|
.three {
|
|
text-indent: 20px;
|
|
}
|
|
h3 {
|
|
/* block / inline-block / none */
|
|
/* display: none; */
|
|
visibility: hidden;
|
|
text-transform: uppercase;
|
|
font: italic bolder 2cm/60px "FatDog";
|
|
/* font-size: 2cm;
|
|
font-family: "FatDog";
|
|
font-stretch: condensed;
|
|
font-style: oblique; */
|
|
}
|
|
.box {
|
|
color: rgb(64, 128, 192);
|
|
height: 220px;
|
|
border: 4px double #00CC33;
|
|
border-left-color: blue;
|
|
border-right-color: red;
|
|
border-radius: 10px 20px 40px 80px;
|
|
width: 50%;
|
|
margin: 50px auto;
|
|
margin-top: 10px;
|
|
text-align: center;
|
|
background-color: #749ABE;
|
|
background-image: url(images/bird.gif);
|
|
/* background-repeat: no-repeat no-repeat;
|
|
background-position: -25px -50px; */
|
|
}
|
|
.box p {
|
|
background-color: white;
|
|
width: 200px;
|
|
height: 40px;
|
|
line-height: 40px;
|
|
margin: 10px auto;
|
|
}
|
|
#photo {
|
|
border: 10px solid gold;
|
|
border-radius: 60px 60px 60px 60px;
|
|
/* border-image: url("images/dots.gif") 10 10 10 10 round; */
|
|
}
|
|
#icon {
|
|
width: 100px;
|
|
height: 100px;
|
|
background: url(images/icons.jpg) no-repeat no-repeat -570px -280px;
|
|
background-color: #00FFFF;
|
|
/* background-image: url(images/icons.jpg);
|
|
background-repeat: no-repeat no-repeat;
|
|
background-position: -570px -280px; */
|
|
}
|
|
#python {
|
|
width: 290px;
|
|
height: 82px;
|
|
background-image: url(images/python-logo.png);
|
|
background-color: #009966;
|
|
}
|
|
/* body {
|
|
background-image: url(images/bird.gif);
|
|
} */
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="python"></div>
|
|
<div id="icon"></div>
|
|
<img id="photo" src="images/tim.png" width="100" height="100">
|
|
<h3>Hello, world!</h3>
|
|
<h1 class="ms">静夜思</h1>
|
|
<hr>
|
|
<div class="box">
|
|
<p class="one">床前明月光</p>
|
|
<p class="two">疑似地上霜</p>
|
|
<p class="three">举头望明月</p>
|
|
<p class="four">低头思故乡</p>
|
|
</div>
|
|
</body>
|
|
</html>
|