CSS设置居屏幕中间的弹出块


.alert {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 300px;
    height: 200px;
    margin-left: -150px;
    margin-top: -100px;
    background: #1c242a;
    -webkit-border-radius: 5px;
    padding-bottom: 15px;
}
        根据屏幕大小自动设置块位置

         不能根据内容自动调整块大小 css

相关文章
相关标签/搜索