小编Chr*_*ter的帖子

为什么我的按钮样式在笔记本电脑和移动设备上会发生变化

我无法弄清楚为什么我的按钮样式在运行 safari 的笔记本电脑上与在这种情况下运行 safari 的 iPhone 手机相比会改变。

HTML代码:

<div id="img_container">
<img src="../assets/images/hotdrinks.png" style="hight:50%;">
<button class="button" onClick="parent.location='hotdrinks.html'"> Hot Drinks Menu </button> 
</div>

<div id="img_container">
<img src="../assets/images/craftbeer.png" style="hight:50%;">
<button class="button" > Craft Club </button>
</div>  
Run Code Online (Sandbox Code Playgroud)

CSS 代码:

#img_container {
position:relative;
display:inline-block;
text-align:center;
}

.button {
position:absolute;
bottom:10px;
right:10px;
width:200px;
height:50px;
font-family: test;  
color: #000000;
text-transform: uppercase;
font-size: 40px;
}
Run Code Online (Sandbox Code Playgroud)

笔记本电脑:
笔记本电脑上的图像 1

电话:
手机上的图片2

html css styles button ios

1
推荐指数
1
解决办法
2147
查看次数

标签 统计

button ×1

css ×1

html ×1

ios ×1

styles ×1