老师,这样对吗
来源:2-7 编程练习
Mr学
2019-05-23 23:09:46
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS布局</title> <style type="text/css"> /*此处写代码*/ *{margin:0;padding:0;} dl{width:1000px;margin:0 auto;} dt{text-align:center;padding:20px;font-size:25px;font-family:"宋体";font-weight: bold;} .con{width:426px;display:block;float:left;margin-left:50px;} .con p{font-size: 16px;font-weight: bold;word-spacing: 5px;} </style> </head> <body> <!-- 此处写代码 --> <dl> <dt>ENJOY THE LIFE</dt> <dd class="con"> <img src="http://climg.mukewang.com/58f829090001a4b504260240.jpg"> <p>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.</p> </dd> <dd class="con"> <img src="http://climg.mukewang.com/58f8290f0001558804260240.jpg"> <p>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.</p> </dd> </dl> </body> </html>
1回答
好帮手慕夭夭
2019-05-24
你好同学,结构布局不太合理。整个布局应该分为两部分,最上面的为标题,要是要标题标签,下面的部分是两组图片,所以要是要两个dl更好
参考如下:
因为结构变化,样式要调整:
祝学习愉快 ,望采纳。
相似问题