這是我第一次嘗試在 www.codeacademy.com 之外實際嘗試做一些 CSS,但我遇到了一些麻煩。當我運行代碼時,我發現標題中的文本未對齊,并且“注銷”被推向右側,而不是與“我的庫存”距邊緣的距離相同。我究竟做錯了什么?如果我的結構很糟糕或有其他問題,請隨時告訴我,以便我可以學習。我希望這是發生此類事情的正確地點!HTML 代碼:<!DOCTYPE html><html dir="ltr"> <head> <meta charset="utf-8"> <title>Blank</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div class="container"> <div class="header"> <header> <ul> <li> <a class="active" href="#home">My Inventory</a></li> <li><a class="browse" href="#browse">Browse Papers</a></li> <li><a class="build" href="#build">Build A Paper</a></li> <li><a class="data" href="#data">View Data</a></li> <li style="float:right"><a class="admin" href="#admin">Settings</a></li> <li style="float:right"><a class="logout" href="#logout">Log Out</a></li> </ul> </header> </div> </div> </body></html>CSShtml { font-family: "PT Sans", sans-serif;}body { margin: 0; padding: 0;}.container { min-height:100%; min-width:100%; display: grid;}a { text-decoration: none;}.header{ font-size: 18px; line-height: 1.25pt; background-color: #00AFB5; width: 100%; height: 50px; top: 0; margin: 0; padding-top: 20px; padding-bottom:20px; padding-left: 10px; padding-right: 10px; list-style-type: none;}.header li { display: inline-block;}.header a { display: block; color: #fff;}
- 0 回答
- 0 關注
- 126 瀏覽
添加回答
舉報
0/150
提交
取消