<p>元素的边框在Ipad / Pro设备中不显示为块元素

当我在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;
        }
    }
} 

<p>元素的边框在Ipad / Pro设备中不显示为块元素

<p>元素的边框在Ipad / Pro设备中不显示为块元素

yjc753951 回答:<p>元素的边框在Ipad / Pro设备中不显示为块元素

另外添加左:0;右:0;在rotateText上,

#rotateText {
       left:0;
       right:0;
    }
本文链接:https://www.f2er.com/3136208.html

大家都在问