0
点赞
收藏
分享

微信扫一扫

常⽤属性

  • 盒⼦的位置和⼤⼩

尺⼨
宽度 width: ⻓度|百分⽐|auto
⾼度 height
边界 margin padding 上右下左|上下左右

  • 布局

浮动:float
定位:position
弹性布局:flex
盒⼦内容超出部分:overflow:hidden | scroll | auto

  • 外观,⻛格

background-image
background-repeat
background-size
background-position
background-color

  • ⽂字属性

字体⼤⼩ font-size
是否加粗 font-weight
是不是斜体 font-style
字体是什么 font-family

  • 代码案例

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box {
width: 100px;
height: 100px;
background-color: red;
/* float: left; */
}

.boxs {
width: 100px;
height: 100px;
background-color: blue;
/* float: right; */
/* position: absolute;
top: 0;
left: 100px; */
overflow: auto;
}

.father {
display: flex;
}

.image {
width: 200px;
height: 200px;
background-color: red;
/* background-image: url('https://file.xdclass.net/xdclass/xdclass_logo.png');
background-repeat: no-repeat;
background-size: 100%;
background-position: bottom; */
/* background: red url('https://file.xdclass.net/xdclass/xdclass_logo.png') no-repeat bottom;
background-size: 100%; */
font-size: 10px;
font-weight: 600;
font-style: italic;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}
</style>
</head>

<body>
<!-- <div class="father">
<div class="box"></div>
<div class="boxs">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Impedit dignissimos cum deleniti explicabo beatae error
pariatur illo inventore quos ipsum!
</div>
</div> -->
<div class="image">
小滴课堂
</div>
</body>

</html>



举报

相关推荐

0 条评论