JSFiddle - React, Tailwind, and code Playground

by 静 轩

HTML

<div id="modal-template" class="dialog wrap">
    <div class="strong-dlg-shadow"></div>
    <div id="strong-dlg-body" class="dlg-body">
        <h1>温馨提示</h1>
        <a href="javascript:;" class="strong-dlg-close"></a>
        <section> 兑换码为空! </section>
        <ul class="strong-dlg-ul">
            <li class="strong-dlg-li">
                <a class="strong-dlg-a dlg-submit-btn"> 确认 </a>
            </li>
        </ul>
    </div>
</div>

CSS

.dialog.wrap,
.strong-dlg-shadow {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.strong-dlg-shadow {
    background: rgba(0, 0, 0, .6);
    z-index: 11;
}

#strong-dlg-body {
    position: absolute;
    top: 20%;
    left: 52%;
    width: 70%;
    z-index: 11;
    text-align: center;
    margin-left: -36%;
    border-radius: .5em;
    background-color: transparent;
    background: #F5D39F;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    color: #4B2B1C;
}

#strong-dlg-body > h1 {
    font-size: 1.24em;
    line-height: 2;
    padding: 0;
    font-weight: normal;
    color: #FFF;
    background-size: 100% 100%;
    position: relative;
}

.strong-dlg-close {
    position: absolute;
    right: -1%;
    top: -27%;
    background-size: 100% 100%;
    width: 2.38em;
    height: 2.38em;
    background-size: 100% 100%;
    background-image: url(https://ooo.0o0.ooo/2016/07/07/577e2764bc5bd.png);
}

#strong-dlg-body > section {
    background-color: #E0AB75;
    text-align: left;
    padding: 4% 2%;
    font-size: 1em;
    line-height: 1.2em;
    border-radius: .5em;
    width: 87%;
    margin: 0 auto;
    text-align: center;
    margin-top: 4%;
}

.strong-dlg-ul {
    width: 100%;
    padding: 0;
    display: -webkit-box;
    display: -moz-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -moz-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.strong-dlg-li {
    list-style: none;
    width: 21%;
    margin: auto 8%;
}

#strong-dlg-body .strong-dlg-a {
    font: 1.2em Microsoft YaHei, sans-serif;
    line-height: 1.69;
    font-weight: bold;
    color: #FFF;
    text-align: center;
    display: inline-block;
    margin: 2% 3% 3%;
    padding: 0 7%;
    width: 100%;
    height: 2em;
    text-decoration: none;
    border:...

JavaScript

/*
https://ooo.0o0.ooo/2016/07/07/577e26762e2ee.png
https://ooo.0o0.ooo/2016/07/07/577e2764bc5bd.png
*/