CSS应用 sohu页面

css作业练手用


sohu.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=gb2312" />
<link rel="stylesheet" type="text/css" href="my.css" />
<title>无标题文档</title>
</head>
<body>
<!--top部分-->
<div class="top">
<span class="login">登录表单</span>
<span class="setindex">设置首页面</span>
<span class="myhref">超链接</span>
</div>
<!--logo-->
<div class="logo">
</div>
<!--导航-->
<div class="navi">
</div>
<!--广告-->
<div class="adAll">
<div class="adstu">
招生广告</div>
<div class="adSport">
运动广告</div>
<div class="adfdc">
房地产广告
</div>
<div class="adimg">
图片广告
</div>
</div>
</body>
</html>

my.css

/* CSS Document */

body{
	margin:0 auto;
	/*border:1px solid green;*/
	width:950px;
	height:800px;
	font-size:12px;
}

.top{
	width:950px;
	/*background:silver;*/
	height:24px;
}

.login{
	width:350px;
	height:22px;
	background:pink;
	float:left;
}

.setindex{
	width:85px;
	height:22px;
	background:green;
	float:left;
	margin-left:100px;
}

.myhref{
	float:right;
	margin-right:5px;
	margin-top:3px;
}

/*我的logo*/
.logo{
	width:130px;
	height:56px;
	background:silver;
	float:left;
	margin-top:3px;
}

/*导航*/
.navi{
	width:805px;
	height:56px;
	background:#7BF773;
	float:left;
	margin:3px;
	margin-right:10px;
}

/*总体广告div*/
.adAll{
	width:950px;
	height:211px;
	border:1px solid sliver;
	margin-top:3px;
	float:left;
}

/*招生广告*/
.adstu{
	width:126px;
	height:195px;
	background:#7BF773;
	border:1px solid silver;
	margin-top:3px;
	float:left;
}

/*运动广告*/
.adSport{
	width:451px;
	height:195px;
	background:#7BF773;;
	float:left;
	margin:5px 0 0 15px;
}

/*房地产广告*/
.adfdc{
	width:151px;
	height:195px;
	background:#7BF773;;
	float:left;
	margin:5px 0 0 15px;
}

/*图片广告*/
.adimg{
	width:180px;
	height:211px;
	background:pink;
	float:right;
	text-align:center;
	border-left:1px solid silver;
}



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值