0
的jsfiddle:https://jsfiddle.net/gu7b3fbs/標誌和形象響應
我期待在中心的圖像位置,「去主站」的最終決定權比圖片更高,同時保持responsivness。然而,當重新調整窗口大小時,「轉到主網站」應該在圖像上方通過。任何幫助?
HTML:
<div class="header">
<div class="wrap">
<div class="logo">
<a href="index.html"><img src="images/logo.png" alt=""/></a>
</div>
<div class="nav">
<ul>
<li class="a"><a href="">Go to the main website</a> </li>
</ul>
<div class="clear"> </div>
</div>
<div class="clear"> </div>
</div>
</div>
CSS:
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,dl,dt,dd,ol,nav ul,nav li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;}
article, aside, details, figcaption, figure,footer, header, hgroup, menu, nav, section {display: block;}
ol,ul{list-style:none;margin:0;padding:0;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
table{border-collapse:collapse;border-spacing:0;}
/* start editing from here */
a{text-decoration:none;}
.txt-rt{text-align:right;}/* text align right */
.txt-lt{text-align:left;}/* text align left */
.txt-center{text-align:center;}/* text align center */
.float-rt{float:right;}/* float right */
.float-lt{float:left;}/* float left */
.clear{clear:both;}/* clear float */
.pos-relative{position:relative;}/* Position Relative */
.pos-absolute{position:absolute;}/* Position Absolute */
.vertical-base{ vertical-align:baseline;}/* vertical align baseline */
.vertical-top{ vertical-align:top;}/* vertical align top */
.underline{ padding-bottom:5px; border-bottom: 1px solid #eee; margin:0 0 20px 0;}/* Add 5px bottom padding and a underline */
nav.vertical ul li{ display:block;}/* vertical menu */
nav.horizontal ul li{ display: inline-block;}/* horizontal menu */
img{max-width:100%;}
/*end reset*/
body {
background: url('../images/bg.jpg') repeat;
}
.wrap {
width: 80%;
margin: 0px auto;
}
.header {
background: white;
border-bottom: 13px solid white;
border-top: 13px solid white;
margin-top: 0em;
}
.logo
{
float: left;
padding-top: 21px;
}
.nav
{
float: right;
width: 47%;
}
.nav ul li
{
float:left;
border-right: 1px solid rgba(238, 238, 238, 0.65);
}
.nav ul li.a
{
border-left: 1px solid rgba(238, 238, 238, 0.65);
}
.nav ul li a
{
font-size: 1.0em;
color:#5F6A72;
font-family: 'Verdana', sans-serif;
display: block;
-webkit-transition: 0.5s linear;
-moz-transition: 0.5s linear;
-ms-transition: 0.5s linear;
-o-transition: 0.5s linear;
transition: 0.5s linear;
padding: 3px 30px;
}
.nav ul li a:hover
{
}
這是位置:
問題在不清楚的地方。請明確爲更好的理解。 –
如果你想在中心的標誌,那麼你爲什麼給浮標:左標識類? –
@Leiotion男士我建立了我的第一個網站,這個網站在響應方面證明是一場完全災難。現在我有了一個模板來保持響應,所以我正在學習。我用定位的圖像更新了帖子。 – mikeb