我在我的网站的徽标上添加了一个负边距,它在我测试过的所有浏览器中看起来都很好。看这里:
问题是它没有在 Safari 桌面上正确显示。看这里:
HTML如下:
<hgroup id="logo_container">
<div id="logo_inside_container">
<h1 id="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="/wp-content/uploads/logo.png" alt="612 Vineyard - Berryville, VA"/></a></h1>
</div>
</hgroup>
CSS如下:
#site-title {
margin-top: -30px;
display: block;
padding: 0;
width: 190px;
height: 143px;
float: left;
}
#site-title img {
width: 190px;
height: 143px;
}
#logo_container {
display: block;
width: 100%;
height: 100%;
margin: -29px 0 0 !important;
background: url('/wp-content/uploads/logo_stripe_bg.png') 0 41px repeat-x;
}
#logo_inside_container {
display: block;
width: 860px;
height: 143px;
margin: 0 auto;
background: url('/wp-content/uploads/logo_stripe.png') 0 41px no-repeat;
}