马进军-2020-10-30

定位

<div><>
position: sticky;粘性定位
bg{
    background: red;测试样式
naver{
    width: 100%;
    height: 36px;
}导航栏
主内容去区
main{
    width: 100%;
    height: 600px;
广告
adv{
    width: 60px;
    height: 300px;
}
position: absolute;绝对定位 

position: relative;相对定位  

position: fixed;固定位置

display:inline block 让行级标签拥有块级标签的特征(自定义大小)依旧保留行级标签不独占一行的特征

dispiay:flex;     弹性布局        

position: fixed ;   /*固定位置*/

text-align:center;   居中

/*测试样式*/
.bg{
    background: red;
     
*页脚*/
.footer

/*整个页面*/
.page{
    width: 100%;
    height: auto;

position: sticky;  /*粘性定位*/

心得:个人觉得自己跟不上学习的步伐。

标签

评论


© 2021 成都云创动力科技有限公司 蜀ICP备20006351号-1