这次的编程真的是陆陆续续的搞了好久
今天终于一口气都给补完了 心累..
第二个编程 做的有点糙...
我真的是尽力了
最后那个绿色的小图标我添加不进去图片
DW的预览里是有图片的 但在网页里打开就没有了
气死我了 跟它磕了好久
也问了别人 还是无能为力...
不知道是什么鬼...
后来达达告诉我可以用代码敲出来小图标...
真的是用了一种最笨的方法...
要学的东西还有好多好多
也有好多半懂不懂的东西....
慢慢啃吧..
还有个迅雷看看在等着我...
距离27号还有俩个小时十五分钟....
链接:http://pan.baidu.com/s/1pKSqRAb 密码:x7u2
喏 有图有真相
一 、 让三个DIV并排显示(三种方法实现)
方法1 浮动法
<style>
div{
width:100px;
height:100px;
background-color:green;
float:left ;
margin : 10px;
}
</style>
</head>
<body>
<div>div1</div>
<div>div2</div>
<div>div3</div>
</body>
方法2 内联法
<style>
div{
width:100px;
height:100px;
background-color:green;
display: inline-block;
}
</style>
</head>
<body>
<div>div1</div>
<div>div2</div>
<div>div3</div>
</body>
方法3 定位法
<style>
div{
width:100px;
height:100px;
background-color:green;
}
.div2{
position:relative;
left:100px;
top:-100px;
}
.div3{
position:relative;
left:200px;
top:-200px;
}
</style>
</head>
<body>
<div class="div1">div1</div>
<div class="div2">div2</div>
<div class="div3">div3</div>
</body>
二、 腾讯大学—列表页
<style>
.box{
width:226px;
height: 1130px;
background-color: #fcfafb;
padding:20px 20px 15px 20px;
}
.head1 {
width:19px;
height:19px;
font:7px/15px "宋体";
text-align:center;
border-top:1px solid #000;
border-left:1px solid #000;
border-right:1px solid #000;
}
.head2{
height: 38px;
width: 226px;
font :19px/20px "宋体";
font-weight:bold;
color: #000;
position:absolute;
left:57px;
top:31px;
}
.head3{
position:absolute;
top:70px;
}
.head4{
padding: 10px 27px 8px 30px;
border: 1px solid #ccc;
border-bottom: none;
font-family:"黑体";
}
.head5{
width:110px;
height:35px;
padding: 10px 19px 8px 19px;
border-bottom: 1px solid #ccc;
color:#919191;
font-family:"黑体";
}
.image{
height: 891px;width: 226px;}
.image1{
background:url(img/1.jpg);
width:226px;
height:160px;
position:absolute;
margin-bottom:20px;
top: 103px;
}
.im11{
width:226px;
height:26px;
background:black;
position:absolute;
bottom:0px;
opacity:0.5;
}
.im12 {
width:20px;
height:26px;
background:#e2291c;
position:absolute;
left:0px;
bottom:0px;
font:9px/26px "宋体";
text-align:center;
color:#fff;
}
.im13 {
width:226px;
height:26px;
position:absolute;
bottom:0px;
font:11px/26px "宋体";
color:#fff;
text-indent:30px;
}
.image2 {
width:226px;
height:158px;
background-image:url(img/2.jpg);
position:absolute;
margin-bottom:100px;
left: 29px;
top: 283px;
}
.im21 {
width:226px;
height:26px;
background:black;
position:absolute;
bottom:0px;
opacity:0.5;
}
.im22 {
width:20px;
height:26px;
background:#e2291c;
position:absolute;
left:0px;
bottom:0px;
font:9px/26px "宋体";
text-align:center;
color:#fff;
}
.im23 {
width:226px;
height:26px;
position:absolute;
bottom:0px;
font:11px/26px "宋体";
color:#fff;
text-indent:30px;
}
.image3 {
width:226px;
height:160px;
background-image:url(img/3.png);
position:absolute;
margin-bottom:20px;
left: 30px;
top: 463px;
}
.im31 {
width:226px;
height:26px;
background:black;
position:absolute;
bottom:0px;
opacity:0.5;
}
.im32 {
width:20px;
height:26px;
background:#f6a544;
position:absolute;
left:0px;
bottom:0px;
font:9px/26px "宋体";
text-align:center;
color:#fff;
}
.im33 {
width:226px;
height:26px;
position:absolute;
bottom:0px;
font:11px/26px "宋体";
color:#fff;
text-indent:30px;
}
.image4 {
width:226px;
height:160px;
background-image:url(img/4.jpg);
position:absolute;
margin-bottom:20px;
left: 28px;
top: 643px;
}
.im41 {
width:226px;
height:26px;
background:black;
position:absolute;
bottom:0px;
opacity:0.5;
}
.im42 {
width:20px;
height:26px;
background:#ec5a2e;
position:absolute;
left:0px;
bottom:0px;
font:9px/26px "宋体";
text-align:center;
color:#fff;
}
.im43 {
width:226px;
height:26px;
position:absolute;
bottom:0px;
font:11px/26px "宋体";
color:#fff;
text-indent:30px;
}
.image5 {
width:226px;
height:160px;
background-image:url(img/5.png);
position:absolute;
margin-bottom:11px;
left: 29px;
top: 823px;
}
.im51 {
width:226px;
height:26px;
background:black;
position:absolute;
bottom:0px;
opacity:0.5;
}
.im52 {
width:20px;
height:26px;
background:#f6a544;
position:absolute;
left:0px;
bottom:0px;
font:9px/26px "宋体";
text-align:center;
color:#fff;
}
.im53 {
width:226px;
height:26px;
position:absolute;
bottom:0px;
font:11px/26px "宋体";
color:#fff;
text-indent:30px;
}
.bottom{
width:226px;
height: 150px;
margin-bottom: 15px;
position:absolute;
left: 25px;
top: 968px;
}
.w1{
width:226px;
height:30px;
position:absolute;
left: 2px;
top: 29px;
}
.w11 {
width:0px;
height:0px;
border-top:16px solid #9fd15a;
border-left:9px solid #9fd15a;
border-right:9px solid #9fd15a;
border-bottom:4px solid #fff;
}
.w12 {
font-size:13px;
color:#fff;
position:absolute;
font-family:"黑体";
left:6px;
top:0px;
}
.w13 {
width:226px;
height:30px;
font:12px/30px "黑体";
text-indent:23px;
color:#000;
position:absolute;
top:-7px;
left: 2px;
}
.w2{
width:226px;
height:30px;
position:absolute;
left: 26px;
top: 1031px;
}
.w21 {
width:0px;
height:0px;
border-top:16px solid #9fd15a;
border-left:9px solid #9fd15a;
border-right:9px solid #9fd15a;
border-bottom:4px solid #fff;
}
.w22 {
font-size:13px;
color:#fff;
position:absolute;
font-family:"黑体";
left:6px;
top:0px;
}
.w23 {
width:226px;
height:29px;
font:12px/30px "黑体";
text-indent:23px;
color:#000;
position:absolute;
top:-7px;
left: -4px;
}
.w3{
width:226px;
height:30px;
position:absolute;
left: 26px;
top: 1065px;
}
.w31 {
width:0px;
height:0px;
border-top:16px solid #9fd15a;
border-left:9px solid #9fd15a;
border-right:9px solid #9fd15a;
border-bottom:4px solid #fff;
}
.w32 {
font-size:13px;
color:#fff;
position:absolute;
font-family:"黑体";
left:6px;
top:0px;
}
.w33 {
width:226px;
height:30px;
font:12px/30px "黑体";
text-indent:23px;
color:#000;
position:absolute;
top:-6px;
left: 3px;
}
.w4{
width:226px;
height:30px;
position:absolute;
left: 25px;
top: 1102px;
}
.w41 {
width:0px;
height:0px;
border-top:16px solid #9fd15a;
border-left:9px solid #9fd15a;
border-right:9px solid #9fd15a;
border-bottom:4px solid #fff;
}
.w42 {
font-size:13px;
color:#fff;
position:absolute;
font-family:"黑体";
left:6px;
top:0px;
}
.w43 {
width:226px;
height:30px;
font:12px/30px "黑体";
text-indent:23px;
color:#000;
position:absolute;
top:-8px;
left: 3px;
}
.w5{
width:226px;
height:30px;
position:absolute;
left: 25px;
top: 1139px;
}
.w51 {
width:0px;
height:0px;
border-top:16px solid #9fd15a;
border-left:9px solid #9fd15a;
border-right:9px solid #9fd15a;
border-bottom:4px solid #fff;
}
.w52 {
font-size:13px;
color:#fff;
position:absolute;
font-family:"黑体";
left:6px;
top:0px;
}
.w53 {
width:226px;
height:30px;
font:12px/30px "黑体";
text-indent:23px;
color:#000;
position:absolute;
top:-6px;
left: 3px;
}
</style>
</head>
<body>
<div class="box">
<div class="head1">TOP</div>
<div class="head2">排行榜</div>
<div class="head3"><span class="head4">最热排行</span><span class="head5">新课上线</span></div>
<div class="image">
<div class="image1">
<div class="im11"></div>
<div class="im12">1</div>
<div class="im13">张小龙:微信四大价值观</div>
</div>
<div class="image2">
<div class="im21"></div>
<div class="im22">2</div>
<div class="im23">刘超:互联网新时代需要什么样...</div>
</div>
<div class="image3">
<div class="im31"></div>
<div class="im32">3</div>
<div class="im33">马化腾:腾讯将专注于做互联网...</div>
</div>
<div class="image4">
<div class="im41"></div>
<div class="im42">4</div>
<div class="im43">IT领袖峰会圆桌会谈:互联网下...</div>
</div>
<div class="image5">
<div class="im51"></div>
<div class="im52">5</div>
<div class="im53">微信支付对实体商业的价值几何?</div>
</div>
<div class ="bottom">
<div class="w1">
<div class="w11"></div>
<div class="w12">6</div>
<div class="w13">张小龙:小程序正式发布 , 开...</div></div>
</div>
<div class="w2">
<div class="w21"></div>
<div class="w22">7</div>
<div class="w23">马化腾:通向互联网未来的七...</div></div>
<div class="w3">
<div class="w31"></div>
<div class="w32">8</div>
<div class="w23">马化腾:腾讯现在只做俩件事</div></div>
<div class="w4">
<div class="w41"></div>
<div class="w42">9</div>
<div class="w43">使用UE4制作VR内容的优化</div></div>
<div class="w5">
<div class="w51"></div>
<div class="w52">10</div>
<div class="w53">何凌南:谣言在想什么</div></div>
</div>
</div>
</body>
</html>