我有这片html/css,我需要用js按钮单击更改div样式,以便我的div变得可见和可点击。我似乎尽一切努力,但由于某种原因,它不起作用。用按钮单击更改div css不起作用
当我点击那个按钮时,没有任何反应,任何人都可以帮忙吗?
<button type="button" id="letsgo" onclick="letitGo()">Process</button>
<div id="textualdiv">blah blah blah</div>
他们下面的脚本:
<script>
function letitGo()
{
document.getElementById("textualdiv").style.opacity="1";
document.getElementById("textualdiv").style.pointer-events="auto";
}
</script>
,并在单独的CSS文件的div风格:
#textualdiv {
z-index:10;
background-color:white;
margin-bottom:0%;
width:70%;
text-align:center;
height:50%;
min-width:500px;
top: 10%;
display: block;
margin: 0 auto !important;
padding:0;
position:relative;
opacity:0;
pointer-events: none;
border-style:solid;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
谢谢,作品像魅力! –