我尝试过这个链接:
http://codepen.io/anon/pen/zxLdgz
http://www.webdesignerdepot.com/2012/10/creating-a-modal-window-with-html5-and-css3/
但它在jsx文件中无法工作。
<a href="#openModal">Open Modal</a>
<div id="openModal" className="modalDialog">
<div>
<a href="#close" title="Close" className="close">X</a>
<h2>Modal Box</h2>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>You could do a lot of things here like have a pop-up ad that shows when your website loads, or create a login/register form for users.</p>
</div>
</div>
还有这段代码:
ondialog()
{
<dialog id="window">
<h3>Sample Dialog!</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Earum, inventore!</p>
<button id="exit">Close Dialog</button>
</dialog>
}
在点击按钮后仍然没有任何作用。