测试界面6
.model{
width: 400px;
height: 300px;
background-color: gainsboro;
position: fixed;
/* top指定了上边框和窗口顶部的距离 */
top: 50%;
/* left指定了左边框和窗口左侧的距离 */
left: 50%;
/* 向上移动150px */
margin-top: -150px;
/* 向左移动200px */
margin-left: -200px;
/* z-index表示显示层级的优先级,数值越大显示在最上层 */
z-index: 10;
}
.shadow{
/* 透明度,也可以写成background-color: rgba(*,*,*,0.*)*/
/* opacity: 0.5; */
/* background-color: darkslategray; */
background-color: rgba(47,79,79,0.5);
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 9;
}
一键复制
编辑
Web IDE
原始数据
按行查看
历史