最佳答案
我有一个关于 HTML 的列表
<div id="header" class="row">
<div id="logo" class="col_12">And the winner is<span>n't...</span></div>
<div id="navigation" class="row">
<ul id="pirra">
<li><a href="#">Why?</a></li>
<li><a href="#">Synopsis</a></li>
<li><a href="#">Stills/Photos</a></li>
<li><a href="#">Videos/clips</a></li>
<li><a href="#">Quotes</a></li>
<li><a href="#">Quiz</a></li>
</ul>
</div>
it changes fine to show horizontally on CSS change
div#navigation ul li {
display: inline-block;
}
但是现在我想用 jQuery 来做,我使用:
$(document).ready(function() {
console.log('hello');
$('#navigation ul li').css('display': 'inline-block');
});
but is not working, What do i have wrong to style my element with jQuery?
谢谢