1 回答

TA貢獻114條經驗 獲得超93個贊
寫代碼最重要的是仔細些。首先class為box的div的“class”寫成了“calss”,其次在css中的box的width后沒有加分號“;”。
你要的效果代碼,我貼下面了。
望采納!
<!DOCTYPE html>
<html>
<head>
? ? <meta charset="UTF-8">
? ? <title>主頁</title>
? ? <style>
? ? ?*{
? ?margin: 0;
? ?padding: 0;
}
.left{
? ?float: left;
? ?width: 33%;
? ?height: 643px;
? ?background-color: #50abff;
? ?position: relative;
}
.middle{
? ?float: left;
? ?width: 34%;
? ?height: 643px;
? ?background-color: #ffef25;
?
}
.right{
? ?float: right;
? ?width: 33%;
? ?height: 643px;
? ?background-color: #ff5261;
?
}
.box{
? ?width:100%;
? ?height: 243px;
? ?position:absolute;
? ?top:400px;
? ?background-color: #b4d1d7;
}
.btn{
position:relative;
top: 70%;
left:50%;
? ?background-color: #b4d1d7;
? ?border: 1px white solid;
}
? ? </style>
</head>
<body>
<div>
? ? <div>
? ? ? ?<input type="button" value="按鈕"/>
? ? </div>
</div>
<div>
?
</div>
<div>
?
</div>
</body>
</html>
- 1 回答
- 2 關注
- 1183 瀏覽
相關問題推薦
添加回答
舉報