请问,如何使下方文字,的左边和图片的左边对齐,另外还有哪些需要更正的呀,谢谢。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>css布局</title>
<style>
*{padding:0px;margin:0px;}
.top{text-align: center;font-size: 40px;margin:20px 0 15px 0;}
.container{width:950px;margin:0 auto;overflow: hidden;text-align: center;}
.left{float:left;}
.right{float:left;}
.container img{padding:10px;}
.p{text-align: left;}
</style>
</head>
<body>
<div class="top">
ENJOY THE LIFE
</div>
<div class="container">
<div class="left">
<img src="http://img1.sycdn.imooc.com/climg//58f829090001a4b504260240.jpg">
<div class="p">Life is like a book,just read more and more<br>refined, more write more carefully. When read,<br>mind open, all things have been indifferent to<br>heart. Life is the precipitation.</div>
</div>
<div class="right">
<img src="http://img1.sycdn.imooc.com/climg//58f8290f0001558804260240.jpg">
<div class="p">Life is like a book,just read more and more<br>refined, more write more carefully. When read,<br>mind open, all things have been indifferent to<br>heart. Life is the precipitation.</div>
</div>
</div>
</body>
</html>0
收起
正在回答 回答被采纳积分+1
2回答
前端小白入门系列课程
- 参与学习 人
- 提交作业 11218 份
- 解答问题 36712 个
从一个不会编程的小白到一个老司机是需要过程的,首先得入门,学习基础知识,然后才能进阶,最后再到精通,本专题是你走进前端世界的不二选择!
了解课程





恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星