css - Safari 6.0 问题将 CSS 定位推到左侧

标签 css

好吧,这是我遇到的一个问题,但我尽力让它听起来不那么本地化,因为这实际上可能与 Safari 有关...

在我的网站上 http://s361608839.websitehome.co.uk/101d/html_new/index.html我们有一个样式为 ozo_button 的按钮,其内部跨度为 btn_arrow_right,它在除 Safari 之外的所有浏览器中看起来都是正确的形式,如下所示:

enter image description here

是什么导致 CSS 在 Safari 6.0 中使按钮看起来像这样(下图),其中箭头位于文本后面?

enter image description here

HTML:

<a class="ozo_button" href="https://console.101distribution.com?v=register" style="width:200px;cursor:pointer;"><span class="btn_arrow_right ozo_button_icon">icon</span><span class="ozo_button_label">Sign-Up &amp; Get Started</span></a>

CSS:

a.ozo_button {
font-family: Verdana;
font-weight: bold;
font-size:13px;
width:75px;
text-decoration:none;
display:block;
padding:5px 15px 5px 0px;
border:1px solid #999999;
text-align:center;
-moz-border-radius:5px;
-webkit-border-radius:5px;
-o-border-radius:5px;
border-radius:5px;
color:#333;
border:1px solid #DDD;
background:#FFFFFF;
background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFFFFF), to(#EEE));
background:-moz-linear-gradient(0% 90% 90deg, #EEE, #FFF);  
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}

a.ozo_button span.ozo_button_icon {
vertical-align:middle;
margin-left: 0px;
float: left;
}
a.ozo_button span.ozo_button_label{
vertical-align:middle;
padding-left:25px;
}
.btn_arrow_right{
text-indent:-9999px;
position:absolute;
height: 35px;
width: 35px;
background:url(../images/arena_sprite.png) -263px -80px no-repeat transparent;
float: left;
}

最佳答案

尝试 display:inline-block;display:block;根据要求也使用 float:left;如果您使用 display:block;

关于css - Safari 6.0 问题将 CSS 定位推到左侧,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14865477/

相关文章:

jquery - 可滚动以显示下方的 DIV 的 DIV

css - 使用 ngif 和 css 动画进行 Angular 滑入和滑出

php - 如何将页脚中回显的 <div> float 到位于其他位置的 <div> 上 (PHP/jQuery/HTML/CSS)

javascript - 如何使用 Javascript 触发 CSS3 淡入效果?

css - 如何重排 CSS 中的 DIV 框以固定在右下角?

javascript - 记住从第二页导航回第一页时的滚动位置

javascript - 单击提交按钮时如何放置进度光标

css - :hover not moving file 上的 IE8 背景位置

html - 为什么内联元素会在小屏幕上换行?

javascript - 当同时设置了 id 和 class 时,如何使组件使用特定的 css