【网页设计】前端练习代码(二)

ps课堂开课啦

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{padding:0;margin:0;font-family:"微软雅黑";font-size:16px;}
div{width:300px;height:296px;background:url(img/8.png) no-repeat;margin:100px auto;border:1px solid #999}
h1{width:286px;height:30px;background:#FFF url(img/9.png) no-repeat 268px center;padding-left:12px;border-bottom:1px solid #999;padding-top:10px;}
h2{color:#FFF;text-align:center;margin-top:50px;}h2 span{font-size:20px;color:#FC3;}
p{margin-left:100px;color:#FFF;margin-top:12px;font-size:12px;}

</style>
</head>

<body>
<div>
<h1>实践等于实赚,等你来领钱!</h1>
<h2>ps网络课堂<br/><span>开课啦</span></h2>
<p>网络在线教学</p>
<P>课程全程录制</P>
<p>24小时在线辅导</p></div>
</body>
</html>

恭贺新年

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{padding:0;margin:0}
div{background:url(images/left.jpg) no-repeat left;width:1000px;height:800px;}
.one{background:url(images/right.jpg) no-repeat right;width:1000px;height:800px;}
.two{background:url(images/top.jpg) no-repeat center 0px;width:1000px;height:150px;line-height:150px;}
.three{background:url(images/bottom.jpg) no-repeat center;}
</style>
</head>

<body>
<div>
<div class="one">
<div class="two">
<div class="three">
<div class="four">
</div></div></div></div></div>
</body>
</html>

背景图像定义列表项目符号 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>背景图像定义列表项目符号</title>
<style type="text/css">
div{border:1px solid #CCC;border-top:5px solid #F60;width:500px;height:250px;margin:100px auto;}
h1{border-bottom:1px solid #CCC;font-size:20px;padding-left:10px;padding-bottom:10px;}
ul{list-style:none;width:500px;height:200px;}
li{padding-bottom:15px;font-size:18px;list-style-image:url(images/hhh.jpg)}
a:link{color:#000}
a:visited{color:#F63}
a:hover{color:#39F}
</style>
</head>

<body>
<div>
	<h1>公司动态</h1>
	<ul>
		<li><a href="#">传智播客大型人才招聘会成功举行</a></li>
    	<li><a href="#">设计免费公开课-授技数码照片图像精修技巧</a></li>
    	<li><a href="#">花再多钱也买不来的uI面试神器免费送啦</a></li>
    	<li><a href="#">传智播客2014版全新IT入门照教程光盘免费领</a></li>
	</ul>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>背景图像定义列表项目符号</title>
<style type="text/css">
div{border:1px solid #CCC;border-top:5px solid #F60;width:500px;height:250px;margin:100px auto;}
h2{border-bottom:1px solid #CCC;font-size:24px;padding-left:10px;padding-bottom:10px;}
ul{list-style:none;}
li{padding-bottom:15px;font-size:18px;list-style-image:url(images/hhh.jpg);}
a:visited{color:#F63}
a:hover{color:#39F}
</style>
</head>

<body>
<div class="all">
<h2 class= "hd">公司动态</h2>
<ul class="bd">
	<li><a>传智播客大型人才招聘会成功举行</a></li>
	<li><a>设计免费公开课-授技数码照片图像精修技巧</a></li>
    <li><a>花再多钱也买不来的UI面试神器免费送啦</a></li>
    <li><a>传智播客2014版全新IT入门教程光盘免费领</a></li>
</ul>
</div>
</body>
</html>

毕业季

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{padding:0;margin:0;}
div{width:220px;height:280px;border:2px solid #CCC;margin:25px auto;text-align:center;}
h1{height:40px;font-size:20px;color:#000;border-bottom:2px dashed #CCC;font-family:"微软雅黑";font-weight:600px;padding-top:10px;}
p{font-size:15px;color:#999;padding-top:5px;padding-bottom:5px;}
</style>
</head>

<body>
<div>
<h1>毕业季|再见青春</h1>
<P>36557人收听</P>
<h2><img src="img/music.jpg" /></h2>
</div>
</body>
</html>

传智之歌

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{padding:0;margin:0;}
div{width:450px;height:200px;background:#FFF;margin:10px;}
.one{width:165px;height:90px;border:3px solid #CCC;display:inline-block;background:#FFF;padding:10px;}
.two{width:165px;height:90px;border:3px solid #CCC;display:inline-block;background:#FFF;padding:10px;}
p{width:190px;height:90px;display:inline-block;color:#00F;font-size:14px;height:30px;background:url(img/play.png) no-repeat right 0;margin-right:12px;margin-left:10px;}
p span{color:#CCC}
p b{font-size:10px}
</style>
</head>

<body>
<div>
<div class="one"><img src="img/music1.jpg"/></div>
<div class="two"><img src="img/music2.jpg"/></div>
<p class="three">传智之歌<span>-</span><b>学工部</b> </p>
<p class="four">无悔青春<span>-</span><b>传智学员</b></p> 
</div>
</body>
</html>

顶部导航栏

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{padding:0;margin:0;}
div{width:300px;height:100px;border-top:3px solid #F63;border-bottom:1px solid #666;background:#CCC}
</style>
</head>

<body>
<div>网站首页&nbsp;学校介绍&nbsp;学员作品&nbsp;联系我们</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{padding:0;margin:0;}
a{display:inline-block;width:500px;height:100px;line-height:100px;border-top:3px solid #F63;border-bottom:1px solid #666;background:#CCC;}
a span{padding-left:40px;}
a span:hover{color:#F60;text-decoration:none}
</style>
</head>

<body>
<a><span>网站首页</span> <span>学校介绍</span> <span>学员作品</span> <span>留言薄</span></a>
</body>
</html>

定义列表实现图文混排

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{padding:0;margin:0;}
.one{width:400px;height:189px;margin:100px auto;border:2px solid #0C3}
.one dt{float:right;}
.one dd{width:220px;height:189px;margin-left:20px;margin-top:20px;font-family:"微软雅黑";}
h1{color:#0C3;font-size:18px;margin-bottom:20px;}
p{font-size:14px;}
</style>
</head>

<body>
<dl class="one">
	<dt><img src="images/zhangpeng.jpg" /></dt>
    <dd>	
    	<h1>谈华为的管道战略</h1>
    	<p>华为执行副总裁徐直军:华为致力于通过提升管道容量、增强管道使能、优化管道管理,使管道更宽、管道覆盖更广、客户体验更好。</p>
    </dd>
</dl>
</body>
</html>

 服装鞋帽数码家电

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{padding:0;margin:0;}
div{background:url(images/bg.jpg) no-repeat;width:130px;height:300px;margin:100px auto;padding-left:45px;padding-top:190px;}
p,ul{color:#FFF;font-family:"微软雅黑";font-size:16px;text-align:center;height:30px;width:80px;margin-bottom:12px;}
p{border-bottom:1px dashed #FFF;}

</style>
</head>

<body>
<div>
	<p>服装鞋帽</p>
    <p>数码家电</p>
    <p>运动户外</p>
    <p>孕婴用品</p>
    <ul>厨卫家具</ul>
</div>
</body>
</html>

咖啡店

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>咖啡店</title>
<style type="text/css">
*{padding:0;margin:0}
.all{width:850px;height:320px;background:#C96;border:5px solid #CCC;margin:30px;}
.img{width:850px;height:250px;background:#300;}</style>
</head>

<body>
<div class="all">
<div class="img"><img src="images/coffee.png" /></div>
</div>
</body>
</html>

李刚 传智播客

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{padding:0;margin:0;}
dl{width:215px;height:300px;border:8px solid #CCC;}
dt{margin:5px;}
dd{color:#CCC;margin-left:25px;margin-top:10px;}
h1{margin-bottom:10px;font-size:14px;}
span{font-size:16px;color:#999;}
p{margin-bottom:10px;font-size:14px;}
</style>
</head>

<body>
<dl>
	<dt><img src="images/img.png" /></dt>
    <dd>
    	<h1><span>李刚</span>&nbsp;传智播客</h1>
        <p>晋级:网页设计师</p>
    	<p>案例:41个</p>
    	<p>经验:4年</p>
    </dd>
</dl>
</body>
</html>

图标

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title><style type="text/css">
*{padding:0;margin:0;}
div{width:780px;height:50px;background:#333;padding-left:20px;}
.one,.two,.three,.four,.five,.six,.seven{width:60px;height:45px;border-bottom:4px solid #39C;display:inline-block;background:url(img/7.png) no-repeat;margin-right:20px;}
</style>
</head>

<body>
<div>
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
<div class="four"></div>
<div class="five"></div>
<div class="six"></div>
<div class="seven"></div>
</div>
</body>
</html>

图标导航栏

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{padding:0;margin:0;}
div{width:720px;height:50px;background:#333;}
.one{width:70px;height:45px;border-bottom:4px solid #39C;display:inline-block;padding-left:10px;background:url(img/1.png) no-repeat;padding-left:15px;margin-right:20px;}
.two{width:70px;height:45px;border-bottom:4px solid #39C;display:inline-block;padding-left:10px;background:url(img/2.png) no-repeat;padding-left:15px;margin-right:20px;}
.three{width:70px;height:45px;border-bottom:4px solid #39C;display:inline-block;padding-left:10px;background:url(img/3.png) no-repeat;padding-left:15px;margin-right:20px;}
.four{width:70px;height:45px;border-bottom:4px solid #39C;display:inline-block;padding-left:10px;background:url(img/4.png) no-repeat;padding-left:15px;margin-right:20px;}
.five{width:70px;height:45px;border-bottom:4px solid #39C;display:inline-block;padding-left:10px;background:url(img/5.png) no-repeat;padding-left:15px;margin-right:20px;}
.six{width:70px;height:45px;border-bottom:4px solid #39C;display:inline-block;padding-left:10px;background:url(img/6.png) no-repeat;padding-left:15px;margin-right:20px;}
.seven{width:70px;height:45px;border-bottom:4px solid #39C;display:inline-block;padding-left:10px;background:url(img/7.png) no-repeat;padding-left:15px;margin-right:20px;}
</style>
</head>

<body>
<div>
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
<div class="four"></div>
<div class="five"></div>
<div class="six"></div>
<div class="seven"></div>
</div>
</body>
</html>

图标栏

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{padding:0;margin:0;}
div{width:620px;height:50px;background:#333;padding-left:20px;}
div span{display:inline-block;border-bottom:4px solid #39C;}
</style>
</head>

<body>
<div>
<span><img src="img/1.png" /></span>
<span><img src="img/2.png" /></span>
<span><img src="img/3.png" /></span>
<span><img src="img/4.png" /></span>
<span><img src="img/5.png" /></span>
<span><img src="img/6.png" /></span>
<span><img src="img/7.png" /></span>
</div>
</body>
</html>

用户

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{padding:0;margin:0}
div{width:150px;height:300px;margin:100px auto;}
h1{border:1px solid #000;margin-bottom:2px;}
p{height:30px;font-size:16px;font-family:"微软雅黑";border:1px solid #000;padding-left:10px;margin-bottom:2px;padding-top:8px;}
</style>
</head>

<body>
<div>
<h1><img src="img/user.jpg" /></h1>
<p>用户姓名:</p>
<p>学习进度:</p>
<p>兴趣爱好:</p>
<p>参与的群:</p>
</div>
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值