2-7练习题,请老师指点一下,谢谢
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS布局</title> <style type="text/css"> <!-- *{padding:0;margin:0;} .con{ width:1000px; margin:0 auto; } .title,.com{float:left;} .title{ width:100%; height:80px; line-height:80px; font-size:45px; text-align:center; font-family:"Microsoft YaHEI"; padding-top:8px; padding-bottom:8px; } img{ width:440px; height:260px; } .com{ width:50%; text-align:center; } .com div{ width:440px; font-size:16px; font-family:"Microsoft YaHei"; font-style:italic; text-align:left; color:#333; padding-left:30px; } --> </style> </head> <body> <div class="con"> <div class="title">ENJOY THE LIFE</div> <div class="com left"> <img src="http://img1.sycdn.imooc.com/climg//58f829090001a4b504260240.jpg" alt="life is a book!"/> <div> Life is like a book,just read more and more refined,more write more carefully.When read,mind open,all things have been indifferent to heart.Life is the precipitation. </div> </div> <div class="com right"> <img src="http://img1.sycdn.imooc.com/climg//58f8290f0001558804260240.jpg" alt="life is a cup!"/> <div> Life is like a cup of tea,let people lead a person to endless aftertastes.You again good taste,it will always have a different taste,different people will have different taste more. </div> </div> </div> </body> </html>
31
收起
正在回答
1回答
经测试,实现的效果和代码的思路没有问题~
祝学习愉快!
前端小白入门系列课程
- 参与学习 人
- 提交作业 11218 份
- 解答问题 36713 个
从一个不会编程的小白到一个老司机是需要过程的,首先得入门,学习基础知识,然后才能进阶,最后再到精通,本专题是你走进前端世界的不二选择!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星