我想我的網站(手機/臺式機)的菜單看起來有點像這樣一個:http://www.panic.lv/en/(移動時的HOME除外) 桌面 - 顯示鏈接「HOME」,「WORKS」,「關於「和」聯繫人「 手機 - 無鏈接,只有徽標隱藏內容On Only手機
我跟着this instructions,但他們似乎並沒有完全工作。
HTML
<div id="wrapper">
<ul class="menu">
<div id="home"><a href="index.html">HOME</a></div>
<div id="works"><a href="workshome.html">WORKS</a></div>
<div id="logo"></div>
<div id="about"><a href="about.html">ABOUT</a></div>
<div id="contacts"><a href="contacts.html">CONTACTS</a></div>
</ul>
</div>
CSS
#wrapper {
margin-left: 30px;
margin-right: 30px;
background-color: none;
margin-top: 30px;
display: flex;
-webkit-display: flex;
-moz-display: flex;
}
.menu {
width: 100%;
height: 100%;
background-color: none;
display: flex;
-webkit-display: flex;
-moz-display: flex;
align-items: center;
-webkit-align-items: center;
-moz-align-items: center;
padding: 0px;
}
@media screen and (min-width: 991px) {
#home {
margin-left: 0px;
height: 30px;
width: 20%;
font-family: 'Ropa Sans', sans-serif;
color: ghostwhite;
font-size: 15px;
font-weight: normal;
background-color: none;
box-sizing: border-box;
text-align: right;
}
#works {
height: 30px;
width: 20%;
font-family: 'Ropa Sans', sans-serif;
color: ghostwhite;
font-size: 15px;
background-color: none;
box-sizing: border-box;
text-align: center;
}
#about {
height: 30px;
width: 20%;
font-family: 'Ropa Sans', sans-serif;
color: ghostwhite;
font-size: 15px;
background-color: none;
box-sizing: border-box;
text-align: center;
}
#contacts {
height: 30px;
width: 20%;
font-family: 'Ropa Sans', sans-serif;
color: ghostwhite;
font-size: 15px;
background-color: none;
box-sizing: border-box;
text-align: left;
} }
@media(大小....){的.class:顯示無} –