伪元素::导致水平滚动条之前

时间:2016-06-25 17:55:59

标签: css css3 overflow pseudo-element pseudo-class

我遇到了摆脱水平滚动条的问题。我的设计设置是正确的尺寸和定位,但我只想隐藏:: before图像元素技巧的溢出。

你可以在这里看到我的意思: http://192.99.37.125/~uptownlounge/

我尝试添加overflow-x:hidden;到身体元素,但它在移动设备上搞砸了。任何其他想法??

1 个答案:

答案 0 :(得分:0)

对于使用此选择器的移动设备,请使用width:100%;#dots-dark::before{}

然后overflow问题将得到解决。

#dots-dark::before {
   background-color: transparent;
   background-image: url("https://s3.amazonaws.com/webdiner/dots-red-top-arrow.png");
   background-position: top center;
   background-repeat: no-repeat;
   background-size: auto;
   position: absolute;
   content: " ";
   height: 131px;
   display: inline;
   width: 100%;
   left: 127%;
   top: -131px;
   margin-left: -804px; 
}
相关问题