当前位置:网站首页>Horizontal layout, vertical layout, shadows and fillets
Horizontal layout, vertical layout, shadows and fillets
2022-07-22 06:21:00 【Dummerd】
Catalog
3、 ... and . Shadows and fillets
horizontal direction
margin-left border-left padding-left width padding-right border-right margin-right
Browser rules The sum of the seven values in the horizontal direction must be equal to the width of the parent element content area
0 5px 50px 100px 50px 5px 0 ==500 ?
Like the above , If not equal to , The browser will adjust this by itself 7 It's worth , Let our equation hold , This process is called overconstraint
How to adjust the browser ?
1、 If 7 None of the values are set auto, Then the browser will adjust margin-right
0 5px 50px 100px 50px 5px 290px ==500
2、7 Among the values are 3 Values can be set auto margin-left width margin-right
1 individual auto, The other two values are fixed
The browser will adjust this auto
2 individual auto, other 1 Values are fixed
margin-left width adjustment width
width margin-right adjustment width
margin-left margin-right meanwhile margin-left margin-right, Each half
3 individual auto
margin-left width margin-right adjustment width
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
.box1 {
width: 400px;
height: 400px;
border: 3px solid red;
}
/* A block element The width defaults to the width of the parent element 100%, Height is supported by content */
.box2 {
width: 200px;
height: 200px;
background-color: palegreen;
overflow: auto;
}
/* overflow Property can set the content of the overflow
Optional value
visible The default value is The content is displayed normally
hidden Cut out superfluous content
scroll Double sided scroll bars appear
*/
</style>
</head>
<body>
<div class="box1">
<div class="box2">
It is because of death that only three people have been cast , Want to hate learning , Answer Jian Han yuezi's lost plot. He has been three Chinese me in a row , Gu Yu is not interested in the weather , When Li was killed, his desire to die in vain was called frugality. He used virtue to make him beautiful , Juan Ming's death is a false beginning. Tianlun is like Jiang Ming's pen, and its Qi qiniu , Gao guiran Qin Tu is one of the empress dowagers who buried you , Or no brother died , Tongsi mingchou and Hong Xin said that you reported that you lost your origin , It's going to be cold after being full , Seeing Li Da go down and get light, I'll be myself .
Also, all the teeth fall into the report , The holy second of peace and water , Nu Rui naturally stared . Also, all the teeth fall into the report , The holy second of peace and water , Nu Rui naturally stared .
</div>
</div>
</body>
</html>
3、 ... and . Shadows and fillets
box-shadow
Used to set the shadow effect of an element , It will not affect the page layout
The first value is : Horizontal offset just -> Left negative -> Right
Second value : Vertical offset just -> Next negative -> On
Third values : Blur radius The default value is 0px
Fourth values : Color The default value is the background color of the box
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
.box1 {
width: 200px;
height: 200px;
background-color: #f60;
margin: 50px auto;
box-shadow:2px 2px 15px rgba(0, 0, 0, 0.5);
/* Knowledge point 1:
box-shadow
Used to set the shadow effect of an element , It will not affect the page layout
The first value is : Horizontal offset just -> Left negative -> Right
Second value : Vertical offset just -> Next negative -> On
Third values : Blur radius The default value is 0px
Fourth values : Color The default value is the background color of the box
*/
}
.box2 {
width: 200px;
height: 200px;
background-color: #bfa;
border-top-left-radius: 50px;
border-bottom-right-radius: 50px;
/* border-radius: ; Set the fillet effect
border-radius:50%; Set circle
*/
}
</style>
</head>
<body>
<!-- Shadow example -->
<div class="box1"></div>
<!-- Fillet example -->
<div class="box2"></div>
</body>
</html>
边栏推荐
- LeetCode刷题:用栈实现队列 与 字符串解码
- 西农大 C plus
- 文档流,盒子模型,外边距及默认样式
- 第1集 vmware虛擬機安裝最牛B教程(12天)
- How to realize visualization of basic equipment efficiently
- Discussion on ASP webshell+ ice scorpion free horse killing
- Episode 3 best B tutorial of VMware virtual machine installation (14 days)
- 表格表单的样式
- 同城订单同城送,爆单依旧得心应手!
- streamlit TypeError: Plain typing.NoReturn is not valid as type argument
猜你喜欢
过d盾 jsp webshell+冰蝎免杀马探讨
Bypass some dog SQL and XSS
Discussion on passing D shield JSP webshell+ ice scorpion avoiding killing horses
第1集 vmware虛擬機安裝最牛B教程(12天)
通信基础设施可视化管理在等保2.0中的作用
同城订单同城送,爆单依旧得心应手!
64. Minimum path and
LeetCode刷题:平衡二叉树与翻转二叉树
Discussion on DLL killing free technology
Idea setup and environment variables
随机推荐
LeetCode刷题:对称二叉树与二叉树的最大深度
创建私有CA,我就用openSSL
动画,及动画的基本使用
bypass 某狗sql和xss
Selenium common practical function Guide
Internet and transport layer protocol
移动研发平台EMAS 3.0全新升级,欢迎登陆阿里云官网搜索EMAS进行体验
机房可视化管理标签自动生成
浮动简介和浮动特点
DLL免杀技术探讨
水平布局,垂直布局,阴影和圆角
网络连接工具大全
面试遇到的问题
数字藏品系统开发——商城盲盒h5平台搭建
免杀exe技术探讨
streamlit TypeError: Plain typing. NoReturn is not valid as type argument
数据中心运维管理技能的重要性
[book club issue 13] + Chapter 1 multimedia processing tool ffmpeg tool set
高度塌陷和清除浮动
leetcode 1413.逐步求和得到正数的最小值