文本应该位于导航栏的中间(垂直)。
我的代码不起作用。
谁能解释为什么?
<style>
#navigationbar {
background: rgb(252,219,121);
background: -moz-linear-gradient(top, rgba(252,219,121,1) 2%, rgba(254,191,1,1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(2%,rgba(252,219,121,1)), color-stop(100%,rgba(254,191,1,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(252,219,121,1) 2%,rgba(254,191,1,1) 100%);
background: -o-linear-gradient(top, rgba(252,219,121,1) 2%,rgba(254,191,1,1) 100%);
background: -ms-linear-gradient(top, rgba(252,219,121,1) 2%,rgba(254,191,1,1) 100%);
background: linear-gradient(to bottom, rgba(252,219,121,1) 2%,rgba(254,191,1,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcdb79', endColorstr='#febf01',GradientType=0 );
height: 40px;
}
#logo {
color:white;
vertical-align:middle;
margin-left:10px;
}
* {
margin:0px;
}
</style>
<link rel="stylesheet" type="text/css" href="style.css">
<div id='navigationbar'>
<a id='logo' href='http://localhost/'>WORK.</a>
</div>