前端教学案例三
一、index.html内容:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Home - Home Page | Architecture - Free Website Template from Templates.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="layout.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/cufon-yui.js" type="text/javascript"></script>
<script src="js/cufon-replace.js" type="text/javascript"></script>
<script src="js/Myriad_Pro_400.font.js" type="text/javascript"></script>
<script src="js/Myriad_Pro_600.font.js" type="text/javascript"></script>
<!--[if lt IE 7]>
<link href="ie_style.css" rel="stylesheet" type="text/css" />
<![endif]-->
</head>
<body id="page1">
<!-- header -->
<div id="header">
<div>
<!-- .logo -->
<div>
<a href="index.html"><img src="images/logo.gif" alt="" /></a>
</div>
<!-- /.logo -->
<form action="" id="search-form">
<fieldset>
<input type="text" /><input type="submit" value="Search" />
</fieldset>
</form>
<!-- .nav -->
<ul>
<li><a href="index.html"><span>home</span></a></li>
<li><a href="about.html"><span>about</span></a></li>
<li><a href="projects.html"><span>projects</span></a></li>
<li><a href="contacts.html"><span>Contacts</span></a></li>
<li><a href="sitemap.html"><span>SiteMap</span></a></li>
</ul>
<!-- /.nav -->
<!-- .extra-box -->
<div>
<div>
<h2>architectural<span>services for customers</span></h2>
<ul>
<li><a href="#">Structural engineering</a></li>
<li><a href="#">Building services</a></li>
<li><a href="#">Specialist consulting</a></li>
<li><a href="#">Urban design</a></li>
<li><a href="#">Transportation</a></li>
<li><a href="#">Design development</a></li>
<li><a href="#">Planning</a></li>
</ul>
<div><a href="#"><em><b>More Services</b></em></a></div>
</div>
</div>
<!-- /.extra-box -->
<!-- .intro-text -->
<div>
<h1>Accuracity<span>is the main feature</span><em>of our drawings</em></h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolo- re magna aliqua.</p>
<div><a href="#">View Our Works</a></div>
</div>
<!-- /.intro-text -->
</div>
</div>
<!-- content -->
<div id="content">
<div>
<div>
<div>
<div>
<h3>Categories</h3>
<ul>
<li><a href="#">Sed ut perspiciatis</a></li>
<li><a href="#">Unde omnisiste</a></li>
<li><a href="#">Natus errorsit</a></li>
<li><a href="#">Voluptatem</a></li>
<li><a href="#">Doloremque lauda</a></li>
<li><a href="#">Accusantium</a></li>
<li><a href="#">Totamrem aperiam</a></li>
<li><a href="#">Eaque ipsa quae</a></li>
<li><a href="#">Lnventore veritatis</a></li>
<li><a href="#">Architecto</a></li>
</ul>
</div>
<!-- .box -->
<div>
<h3>Login Form</h3>
<form action="" id="login-form">
<fieldset>
<div><label for="text">Username:</label><input type="text" name="text"/></div>
<div><label for="text">Password:</label><input type="password" name="text"/></div>
<div>
<input type="submit" value="Log In" class="submit fleft" />
<div><input type="checkbox" name="checkbox" id="checkbox" /><label for="checkbox">Remember</label></div>
</div>
</fieldset>
</form>
</div>
<!-- /.box -->
</div>
<div>
<div>
<h2>Welcome<em>To our Architect website page</em></h2>
<p><strong>Healthy Building</strong> is a free web template created by TemplateMonster.com team. This website template is optimized for 1024X768 screen resolution.</p>
<div>
<img src="images/img1.jpg" alt="" />
This website template can be delivered in two packages - with PSD source files included and without them. If you need PSD source files, please go to the template download page at TemplateMonster to leave the e-mail address that you want the template ZIP package to be delivered to.
</div>
This website template has several pages: <a href="index.html">Home</a>, <a href="about.html">About</a>, <a href="projects.html">Projects</a> (with <a href="project.html">Project Page</a>), <a href="contacts.html">Contacts</a> (note that contact us form – doesn’t work), <a href="sitemap.html">Site Map</a>.
</div>
<h3>Latest Projects</h3>
<div>
<div>
<div>
<p><img src="images/img2.jpg" alt="" /></p>
<h4>Project 1</h4>
<p>At vero eos et acmus et iusto odio dignis simos duci mus.</p>
<div><a href="#"><em><b>Read More</b></em></a></div>
</div>
</div>
<div>
<div>
<p><img src="images/img3.jpg" alt="" /></p>
<h4>Project 2</h4>
<p>Nalibero tempore cum soluta nobiest elige ndioptio.</p>
<div><a href="#"><em><b>Read More</b></em></a></div>
</div>
</div>
<div>
<div>
<p><img src="images/img4.jpg" alt="" /></p>
<h4>Project 3</h4>
<p>Temporibus uibusdam et aut officiis debitis aut rerum.</p>
<div><a href="#"><em><b>Read More</b></em></a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- footer -->
<div id="footer">
<div>
<a href="http://www.templatemonster.com/" target="_blank" rel="nofollow">www.templatemonster.com</a><br/>
<a href="http://www.templates.com/product/3d-models/" target="_blank" rel="nofollow">www.templates.com</a>
</div>
</div>
<script type="text/javascript"> Cufon.now(); </script>
</body>
</html>
二、style.css内容:
* {margin:0;padding:0}
html, body {height:100%}
body {background:#fff;font-family:Arial, Helvetica, sans-serif;font-size:100%;line-height:1.25em;color:#4a4a4a}
img {border:0;vertical-align:top;text-align:left}
object {vertical-align:top;outline:none}
ul, ol {list-style:none}
.fleft {float:left}
.fright {float:right}
.clear {clear:both}
.col-1, .col-2, .col-3 {float:left}
.alignright {text-align:right}
.aligncenter {text-align:center}
.wrapper {width:100%;overflow:hidden}
/* GLOBAL*/
.container {width:960px;margin:0 auto;font-size:.875em;position:relative}
#header {height:513px;background:url(images/header-tail.gif) 0 0 repeat-x #f7f7f7}
#header .container {background:url(images/header-bg.jpg) no-repeat 100% 100%;height:513px}
#content {background:#fff;padding:32px 0 60px 0}
#content .aside {width:269px;float:left;margin-right:49px}
#content .mainContent {float:left;width:602px}
#footer {background:url(images/footer-bg.gif) 0 0 repeat-x #f2f2f2;text-align:center;padding:45px 0}
/* tailings */
.tail-top {background:url(images/tail-top.gif) left top repeat-x #ffbb00}
.tail-bottom {background:url(images/tail-bottom.gif) left bottom repeat-x}
/* forms parameters */
input, select, textarea {font-family:Arial, Helvetica, sans-serif; font-size:1em;vertical-align:middle;font-weight:normal}
/* other */
.img-indent {margin:0 20px 0 0;float:left}
.img-box {width:100%;overflow:hidden;padding-bottom:12px}
.img-box img {float:left;margin:0 20px 0 0}
.extra-wrap {overflow:hidden}
p {margin-bottom:20px}
.p1 {margin-bottom:10px}
.p2 {margin-bottom:20px}
.p3 {margin-bottom:30px}
/* txt, links, lines, titles */
a {color:#d60c0c;outline:none}
a:hover {text-decoration:none}
h1 {font-size:36px;line-height:1.2em;color:#d60c0c;font-weight:600;margin-bottom:22px}
h1 span {display:block;font-size:30px;line-height:1.2em;color:#4a4a4a;margin-top:-10px}
h1 em {display:block;font-style:normal;font-size:24px;line-height:1.2em;color:#919191}
h2 {font-size:36px;line-height:1.2em;margin-bottom:10px}
h2 em {font-size:14px;color:#838383;display:block;text-transform:uppercase;margin-top:-17px;font-weight:400}
h3 {font-size:30px;line-height:1.2em;color:#4a4a4a;font-weight:400;margin-bottom:20px}
h4 {font-size:1em;color:#d60c0c;margin-bottom:8px}
h5 {font-size:1em;color:#d60c0c}
h6 {font-size:1em}
.txt1 {color:#d60c0c}
.txt2 {}
.link1 {display:block;float:left;background:url(images/link1-bg.gif) left top repeat-x;color:#383838;text-decoration:none;text-shadow:1px 1px 0 #eee}
.link1:hover {text-decoration:underline}
.link1 em {display:block;background:url(images/link1-left.gif) no-repeat left top}
.link1 b {display:block;background:url(images/link1-right.gif) no-repeat right top;padding:8px 15px 8px 15px;font-weight:normal; font-style:normal}
.button {float:left;width:137px;height:40px;line-height:40px;color:#fff;text-align:center;text-decoration:none;background:url(images/button.gif) no-repeat 0 0}
.button:hover {text-decoration:underline}
.line-hor {background:#3a3c52;height:1px;overflow:hidden;font-size:0;line-height:0;margin:20px 0 20px 0}
.line-ver {background-image:url(images/line-ver.gif);background-repeat:repeat-y;width:100%}
.title {margin-bottom:20px}
/* boxes */
.box {background:#f7f7f7;padding:30px 35px 36px 40px}
.box1 {background:url(images/box1-bg.gif) no-repeat 100% 100% #b40303;padding:17px 18px 21px 19px;color:#ffd2d2}
.box1 h4 {font-size:1em;color:#fff}
.address {float:left}
.address dt {margin-bottom:16px}
.address dd {clear:both;text-align:right}
.address dd span {float:left;padding-right:25px}
/* header*/
#header .logo {position:absolute;left:8px;top:20px}
#header .nav {position:absolute;right:0;top:91px}
#header .nav li {float:left}
#header .nav li a {float:left;color:#3c3c3c;text-decoration:none;font-size:17px;text-transform:uppercase;font-weight:400}
#header .nav li a span {float:left;padding:26px 32px 15px 32px}
#header .nav li a:hover, #header .nav li a.current {background:url(images/nav-left.gif) no-repeat 0 0;color:#d60c0c}
#header .nav li a:hover span, #header .nav li a.current span {background:url(images/nav-right.gif) no-repeat 100% 0}
.extra-box {background:url(images/header-box.jpg) no-repeat 0 0;position:absolute;left:0;top:100px;width:269px;height:413px;color:#fff}
.extra-box .inner {padding:25px 28px 0 37px}
.extra-box h2 {font-size:24px;line-height:1.2em;text-transform:uppercase;font-weight:600;margin-bottom:25px}
.extra-box h2 span {display:block;font-size:16px;line-height:1.2em}
.extra-box ul {padding-bottom:25px}
.extra-box ul li {background:url(images/arrow1.gif) no-repeat 0 7px;padding:0 0 12px 19px}
.extra-box ul li a {color:#ffd2d2}
.intro-text {position:absolute;left:317px;top:185px;width:260px}
.intro-text p {width:185px}
/* content */
#content .indent {padding:0 20px 30px 37px}
#content .article {padding-bottom:40px}
.list1 li {background:url(images/arrow2.gif) no-repeat 0 7px;padding:0 0 11px 18px}
.list1 li a {color:#d60c0c}
.list1 ul {margin:13px 0 -7px 0}
.projects {overflow:hidden;margin-bottom:-20px}
.projects li {width:100%;overflow:hidden;padding-bottom:20px}
.projects li img {float:left;margin-right:20px}
/* footer*/
#footer {color:#5c5c5c}
/* forms */
#search-form {position:absolute;right:37px;top:34px}
#search-form fieldset {border:none;display:inline}
#search-form input.text {width:195px;padding:3px 0 3px 5px;border:1px solid #d2d2d2;background:#fff;margin-right:8px}
#search-form input.submit {background:url(images/submit-bg.gif) no-repeat 0 0;width:79px;height:34px;border:none;color:#fff;font-size:14px;cursor:pointer}
#login-form fieldset {border:none}
#login-form .field {height:63px}
#login-form input.text, #login-form input.password {width:180px;border:1px solid #dedede;padding:4px 7px 4px 5px}
#login-form .submit {background:url(images/login.gif) no-repeat 0 0;width:73px;height:34px;border:none;color:#fff;cursor:pointer;text-align:center;line-height:34px}
#login-form .fright {line-height:34px}
#login-form #checkbox {margin-right:10px;line-height:34px}
#contacts-form {clear:right;width:100%;overflow:hidden}
#contacts-form fieldset {border:none;float:left}
#contacts-form .field {clear:both}
#contacts-form label {float:left;width:123px;line-height:18px;padding-bottom:6px;font-weight:bold}
#contacts-form input {width:265px;padding:1px 0 1px 3px;background:none;border:1px solid #e5e5e5;color:#616161;float:left}
#contacts-form textarea {width:470px;height:325px;padding:1px 0 1px 3px;background:none;border:1px solid #e5e5e5;color:#616161;margin-bottom:12px;overflow:auto;float:left}
#contacts-form .button {background:url(images/send-button.gif) no-repeat 0 0;width:160px;line-height:34px;float:right}
三、layout.css内容:
/* index.html */
#page1 #content .col-1, #page1 #content .col-2 {width:178px;margin-right:34px}
#page1 #content .col-3 {width:178px}
/* index-1.html */
#page2 #content .col-1, #page2 #content .col-2 {width:178px;margin-right:34px}
#page2 #content .col-3 {width:178px}
/* contacts.html */
#page5 #content .col-1 {width:87px}
#page5 #content .col-2 {width:175px}
#page5 #content .col-3 {width:340px}
您可能感兴趣的文章
- 05-19DOM的元素获取
- 05-13精灵图
- 05-13flex布局
- 05-10HTML表格标签
- 05-07border属性 :规定围绕表格的边框的宽度。
- 05-07innerText和innerHTML的区别
- 05-05Css样式的三种引用方式
- 05-05JavaScript的基本变量应用格式
- 05-05css盒子模型详解
- 05-05flex布局中,align-content和align-items居中的区别


阅读排行
推荐教程
- 09-12js的数组和二维数组教程
- 08-25网页交互开发高级第八章课后习题及答案
- 10-06transform-origin详解
- 04-14利用数学函数随机生成六位数验证码
- 08-25网页交互开发高级第十四章课后习题及答案
- 09-11animation打字效果案例
- 09-04css如何实现文字分散对齐
- 07-28前端教学案例六
- 05-05Css样式的三种引用方式
- 05-05JavaScript的基本变量应用格式