こんにちは、私は中央にロゴの入った水平メニューを持っていますが、インラインになるようなことはできませんが、これまでのところすべてのブラウザでよく見えます。応答性の高いロゴを中心に
レスポンシブルモードでは、常にロゴを上に表示し、ボタンを押してメニューを表示/非表示にします。 レスポンスではロゴが非表示になり、ショーメニューをクリックするとulの中央にロゴのあるメニューが表示されます。
これまでのところ、少し乱雑なコードです。ここでまた
* {
margin: 0;
border: 0;
padding: 0;
}
body {
font-family: sans-serif;
margin: 5px;
background: #F1F6F8;
}
a {
font-weight: bold;
color: #3F5767;
text-decoration: none;
}
a:hover {
color: #524C56;
}
#wrapper {
max-width: 980px;
margin: 0 auto;
}
header {
width: 100%;
height: 100px;
top: 0;
left: 0;
}
/* Logo code can go here */
ul li a.logo {
background: url(https://i.stack.imgur.com/1dcqW.png) no-repeat center;
height:76px;
width:175px;
display:block;
padding:5px;
margin: 0 auto;
}
nav {
text-align: center;
}
li {
font-family: sans-serif;
font-size: 150%;
display: inline-block;
padding: 0 10px 0 10px;
}
nav ul li a {
color: #3F5767;
}
/* Start controls checkbox change button */
ul li a:hover + .hidden, .hidden:hover{ /* Maybe remove this */
display: block;
width: auto;
}
input[type=checkbox] {
display: none;
}
input[type=checkbox]:checked ~ #menu{
display: block;
}
.show-menu{
font-family: sans-serif;
font-weight: bold;
text-decoration: none;
color: #3F5767;
background: #424242;
text-align: center;
padding: 3px o;
display: none;
}
.thing:before {
content: "Show Menu";
}
input[type=checkbox]:checked ~ .thing:before {
content: "Close Menu";
}
@media screen and (max-width: 760px) {
ul{position: static;
display: none;
}
li{
margin: 0 auto;
font-size: 100%;
padding: 0;
/*border-bottom: 2px solid #676767;*/
}
ul li, li a{
width: 100%;
font-size: 15px;
}
.show-menu{
display: block;
width: auto;
height: 30px;
padding: 3px 0 0 0;
}
}
/* End controls checkbox change button */
@media print {#ghostery-purple-box {display:none !important}}
<!DOCTYPE html>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>Coast Fm Tasmania</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div id="wrapper">
<header>
<nav>
<input id="show-menu" role="button" type="checkbox">
<label for="show-menu" class="show-menu thing">   </label>
<ul id="menu">
<li>
<a href="index.html" class="current">Home</a></li>
<li><a href="#">Events</a></li>
<li><a href="#">On-Air</a></li>
<li><a href="#">Gallery</a></li>
<li><a class="logo" href="index.html"></a></li>
<li><a href="#">Sport</a></li>
<li><a href="#">The Team</a></li>
<li><a href="#">Sponsors</a></li>
</ul>
</nav>
</header>
</div>
</body>
</html>
あなたはjqueryのを使用して動的に
を希望リストに追加することができます Coast FM
おかげ
こんにちは、私はあなたがこれをどのようにしているのが大好きです。 ? Safariで反応が見られない –
ねえ、Safari 10.1でテストしたところ、うまく動作します。問題の写真を私に見せてもらえますか? –
こんにちは私はそれが隠すとは思わなかったのが好きですフレックスボックスのコードを少し変更したのでSafariで動作します。対応メニューでロゴが隠されている空白を取り除く方法はありますか? –