我對html很新穎,而且我在調整圖像大小時遇到問題。我使用html5和css3。我想在導航欄的右側放置一個徽標,但每次調整大小時,它都會保持其原始大小。導航中的圖像不會調整大小
nav ul {
list-style:none;
margin:0;
padding:0;
text-align:center;
background-color: rgb(211, 11, 11);
}
nav ul li {
display: inline;
}
.navlink:link, .navlink:visited {
display: inline-block;
width: 120px;
font-weight: bold;
color: rgb(255,255,255);
background-color: rgb(211, 11, 11);
text-align: center;
padding: 5px;
text-decoration: none;
text-transform: uppercase;
}
.navlink:hover, .navlink:active {
background-color: rgb(162, 2, 2);
}
.navlink:first-letter {
font-size: 250% ;
}
nav {
position:fixed;
top: 0;
margin:auto;
left: 0;
right: 0;
width: 100%;
background-color: rgb(211, 11, 11);
opacity: 0.8;
border-bottom: white thin solid;
z-index: 1000;
clear: both;
}
#ucc_logo{
float:right;
height: 5px;
width: auto;
}
<nav id="navbar">
<ul>
<a href="index.html" class="navlink"><li>Base</li></a>
<a href="output.html" class="navlink"><li>Output</li></a>
<a href="obscure.html" class="navlink"><li>Obscure</li></a>
<a href="logic.html" class="navlink"><li>Logic</li></a>
<a href="extras.html" class="navlink"><li>Extras</li></a>
</ul>
<a id="ucc_logo" href="http://www.ucc.ie/en/"><img src="http://i.imgur.com/ISnWKPd.jpg" alt="UCC Logo"></a>
</nav>
唉唉,太感謝你了,我是集中這麼多弄清楚爲什麼高度/寬度不工作,我錯過了明顯的錯誤 – PFOD1998 2015-03-02 18:59:18