我正在尝试将徽标水平和垂直居中。到目前为止我有这个...
<script type="text/javascript">
$(document).ready(function(){
$(window).resize(function(){
$('#theLogo').css({
position:'absolute',
left: ($(window).width() - $('#theLogo').outerWidth())/2,
top: ($(window).height() - $('#theLogo').outerHeight())/2
});
});
$(window).resize();
});
</script>
HTML
<div id="theLogo">
<section id="responsiveLogo" class="logo">September</section>
</div>
我试图集中这一点:
<section id="responsiveLogo" class="logo">September</section>