首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >围绕内容构建css框架

围绕内容构建css框架
EN

Stack Overflow用户
提问于 2013-10-26 07:25:08
回答 1查看 70关注 0票数 1

我需要在mi内容周围建立一个框架,它会在框架下滚动。

我做了一个上边距,一个下边距和一个左右边距

它似乎工作正常,但有时在底部和中间之间,或者顶部和中间之间,我得到一个无效的像素

而在移动设备上,如果没有设置视窗,情况会变得更糟

我没有其他的想法让同样的东西变得更好

下面是一个链接http://jsfiddle.net/zBAPX/的示例

代码语言:javascript
复制
#mask-center-container {
 z-index: 1000;
 position: fixed;
 top: 10%;
 bottom: 4%;
 left: 0;
 right: 0;
 width: 100%;
 margin: 0;
 padding: 0;
}

#mask-center-container-sx {
 height: 100%;
 width: 21%;
 background: #000;
 opacity: 0.5;
 margin: 0;
 padding: 0;
}

#mask-center-container-ce {
 height: 100%;
 width: 56%;
 margin: 0;
 padding: 0;
}

#mask-center-container-dx {
 height: 100%;
 width: 22%;
 background: #000;
 opacity: 0.5;
 margin: 0;
 padding: 0;
}

#mask-top {
 z-index: 3000;
 position: fixed;
 top: 0;
 left: 0;
 right: 0;  
 height: 10%;
 width: 100%;
 background: #000;
 opacity: 0.5;
 margin: 0;
 padding: 0;
}

#mask-bottom {
 z-index: 3000;
 position: fixed;
 bottom: 0;
 left: 0;
 right: 0;  
 height: 4%;
 width: 100%;
 background: #000;
 opacity: 0.5;
 margin: 0;
 padding: 0;
}
EN

回答 1

Stack Overflow用户

发布于 2013-10-26 20:41:08

我只知道一种有效单击元素的方法,那就是使用实验性的pointer-events属性。下面是CSS Tricks的一篇文章:

http://css-tricks.com/almanac/properties/p/pointer-events/

一个主要缺陷:在IE11之前不支持IE。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19600899

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档