【问题标题】:Borders of <p> element don't show up as block element in Ipad/Pro device<p> 元素的边框在 Ipad/Pro 设备中不显示为块元素
【发布时间】:2019-11-08 17:09:58
【问题描述】:

当我在 Ipad / Ipad pro 中设置浏览器时,会出现

的紫色边框

元素不显示。为什么?

相关代码:

<img src="RotateMobile.gif" alt="" id="rotateAnimation">
    <p id="rotateText">Please turn your device</p>
@media screen and (max-width:1024px) {
    @media screen and (orientation:portrait)
    {

        #rotateAnimation {
            width: 80vw;
            height: 60vh;
            display: block;
            margin: auto;
            position: relative;
            top: 30vh;
        }

        #rotateText {
            font-size: 300%;
            text-align: center;
            color: white;
            text-shadow: 2px 2px black;
            border-top: 3vh solid #D52C82;
            border-bottom: 3vh solid #D52C82;
            position: absolute;
            top: 0px;
            margin: 0;
        }
    }
} 

对比

【问题讨论】:

  • 您需要更好地提出您的问题 - 据我所知,边框确实在 iPad 模式渲染中显示

标签: html css ipad responsive-design


【解决方案1】:

另外添加left:0;和权利:0;在旋转文本上,

#rotateText {
       left:0;
       right:0;
    }

【讨论】:

  • 工作,但为什么?我认为你只能使用右侧或左侧
猜你喜欢
  • 1970-01-01
  • 2013-09-11
  • 1970-01-01
  • 1970-01-01
  • 2017-09-25
  • 1970-01-01
  • 1970-01-01
  • 2018-05-11
  • 1970-01-01
相关资源
最近更新 更多