<分区>
我有这个html代码
<div>
This is content
<button>Continue</button>
</div>
<div style="cursor: crosshair; position: absolute; top: 0px; width: 200px; height: 100px;"></div>
它按预期工作。但问题是它不应该覆盖按钮。那就是 +(加号)符号不应该显示在按钮上。我应该能够点击这个场景的按钮。
最佳答案
这将使您的原始代码保持完整:(演示:http://jsfiddle.net/7muPm/)
<html>
<body>
<div class='div1'>
This is content
<button class='butt1'>Continue</button>
</div>
<div class="div2"></div>
</body>
</html>
CSS
.div1 {
cursor: crosshair; // remove this if this div should not have crosshair
position: relative;
z-index: 10
}
.div2 {
cursor: crosshair;
position: absolute;
top: 0px;
width: 200px;
height: 100px;
z-index: 9;
}
.butt1 {
position: relative;
z-index: 10
}
关于html - 从 css 十字准线属性跳过按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21983396/