当前位置:网站首页>Hierarchy of elements
Hierarchy of elements
2022-07-27 13:22:00 【Sorry, this person doesn't exist】
The hierarchy of elements
<!DOCTYPE html>
<html lang="ch">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style> body{
font-size: 50px; } .box1{
width: 200px; height: 200px; background-color: #bbffaa; position: absolute; /* The positioning element is turned on at , Can pass z-index Attribute to specify the hierarchy of elements z-index You need an integer as an argument , The higher the value, the higher the level of the element The higher the level of the element, the month will be displayed first If the levels of the elements are the same , The lower elements are shown first No matter how high the level of the ancestor element is, it will not cover the descendant element */ /* z-index: 1; */ } .box2{
width: 200px; height: 200px; background-color: rgba(255, 0, 0, .3); position: absolute; top: 50px; left: 50px; /* z-index: 2; */ } .box3{
width: 200px; height: 200px; background-color: yellow; position: absolute; top: 100px; left: 100px; /* z-index: 3; */ } .box4{
width: 100px; height: 100px; background-color: orange; position: absolute; } </style>
</head>
<body>
<div class="box1">1</div>
<div class="box2">2</div>
<div class="box3">3
<div class="box4"></div>
</div>
</body>
</html>
- You will know the principle once you run it
边栏推荐
猜你喜欢

JS true / false array conversion

接口测试实战教程01:接口测试环境搭建

Detail throw and throws

Multi activity disaster recovery construction after 713 failure of station B | takintalks share

Cvpr22 | graph neural architecture search of relational consciousness

文章复现:SRCNN

实现新增加硬盘的磁盘分区和文件系统挂载

Minimally invasive brain science broke the listing: the company's market value is HK $14.3 billion, and minimally invasive medical is the major shareholder

How can the top 500 enterprises improve their R & D efficiency? Let's see what industry experts say!

爱可可AI前沿推介(7.27)
随机推荐
[Nuxt 3] (十二) 项目目录结构 2
ECCV2022 | RU&谷歌提出用CLIP进行zero-shot目标检测!
Overview of famous inner classes and anonymous inner classes
Eccv2022 | Ru & Google proposed to use clip for zero shot target detection!
How to debug JNI program
Application for the latest version of Pan domain name certificate
【表达式计算】双栈 : 表达式计算问题的通用解法
Do you really understand CMS garbage collector?
Talk about one of the important classes of feign components, reactivefeign
文章复现:SRCNN
面试考点:三种图的问题
POJ2446 Chessboard【二分图最大匹配】
pg同步多张数据表至mysql 有办法简化配置吗?
Detail try catch finally
视频游戏沉迷行为研究综述
v-show
高度塌陷和BFC
初探基于OSG+OCC的CAD之任意多个子模型进行netgen以及gmsh网格划分
聊聊feign组件的一个重要类RefectiveFeign
Build mtk6765 compilation environment