Web前段基础
HTML-01Android机器人
此页面包含的知识点:
背景色:background-color;外边距:margin;
圆角:border-radius;
定位:position; 值relative,absolute;
相对定位:
1)占位;
2)相对于自身位置定位
绝对定位:
1)不占位;
2)相对于最近的有定位的父级,如果父级都没有定位则相对于浏览器第一屏的可视区域。
变形、转换:transform;值 rotate(旋转 单位deg)、scale(缩放 单位 %)
transform 变形、转换
rotate 旋转
30deg 30度
scale 缩放
scale(1); 等比例缩放
<style>
.body {
width: 220px;
height: 184px;
background-color: #a4ca39;
margin: 200px auto 0 auto;
border-radius: 0 0 20px 20px;
position: relative;
}
.head {
width: 220px;
height: 110px;
background-color: #a4ca39;
border-radius: 110px 110px 0 0;
position: absolute;