【发布时间】:2017-03-26 16:51:00
【问题描述】:
我正在使用优惠券代码构建一个网站,到目前为止,我对它在桌面上的外观感到满意,但是当我在智能手机上查看它时,它看起来很糟糕。我想要实现的是让这个 div 在智能手机中显示 100% 宽,而在桌面视图中保持 70%。这是我使用的代码:
<div class="couponr" style="width: 80%; padding: 10px; text-align: center; border: 5px dashed red; margin:auto ">
<h3>
<span style="background-color:#ffffff;"><strong>HELLOCAVITE</strong></span>
</h3>
<hr />
<h3>
P100 Off on 5 Rides!
</h3>
Copy the coupon above at checkout to redeem P100 off from Uber.
</div>
查看此示例输出here 在桌面上看起来不错,但在较小的屏幕上很难看。感谢你的帮助!
【问题讨论】:
标签: html css wordpress responsive-design