正在回答
5回答
检查了同学的代码,是css样式写错了哦,border和display都是属性,之间要是用分号隔开
正确代码:
希望可以帮到你!
明智之选
2019-08-16 20:57:05
<!DOCTYPE html> <html> <head> <title>CSS样式-2</title> <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"/> <style type="text/css"> h1{text-align: center;font-size: 24px;color: white;} span{vertical-align: middle;} .mychar{width: 100%; height: 400px; border:1px display:table } .url{ text-align: center; vertical-align: middle; display: table-cell } </style> </head> <body> <div style="background-color: black;line-height: 3em;"> <h1><span>欢迎来到慕课网</span></h1> </div> <div class="mychar"> <div class="url"> <p>慕课网,只学有用的!</p> <p>慕课网(IMOOC)是IT技能学习平台。<br/> 慕课网(IMOOC)提供了丰富的移动端开发、php开发、web前端开发、Android开发和html5等视频教程资源公开课。<br> 并且富有交互性和趣味性,你还可以和朋友一起来编程。</p> </div> </div> </body> </html>
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星