我有一个带css的模态层。当我用Javascript打开模态层时,我想更改宽度:400px到其他任何东西。我该怎么办?
<div id="openModal" class="modalDialog">
<div>
<a href="#close" title="Close" class="close">X</a>
<video width="640" height="480" id="notes_video" controls fullscreen>
<source src="video/Opening.webm" type="video/webm">
<track kind="subtitles" src="opening.vtt" srclang="de"></track>
Your browser does not support the video tag.
</video>
</div>
</div>
CSS-代码:
.modalDialog > div {
width: 400px;
}
感谢您的帮助
答案 0 :(得分:0)
$(".modalDialog").css("width", "10px");