日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > HTML >内容正文

HTML

8.23 前端面经总结

發布時間:2024/10/8 HTML 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 8.23 前端面经总结 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.關于前端書籍推薦
如果有人讓你推薦前端技術書,請讓他看這個列表
伯樂在線已經在 GitHub 上同步了這個列表:https://github.com/jobbole/awesome-web-dev-books ,歡迎擴散。

2.http://web.jobbole.com/94371/?utm_source=blog.jobbole.com&utm_medium=relatedPosts這個不錯
3.
右邊寬度固定,左邊自適應
第一種:

body{
display: flex;
}
.left{
background-color: rebeccapurple;
height: 200px;
flex: 1;
}
.right{
background-color: red;
height: 200px;
width: 100px;
}






body{
display: flex;
}
.left{
background-color: rebeccapurple;
height: 200px;
flex: 1;
}
.right{
background-color: red;
height: 200px;
width: 100px;
}





第二種


div {
height: 200px;
}
.left {
float: right;
width: 200px;
background-color: rebeccapurple;
}
.right {
margin-right: 200px;
background-color: red;
}





div {
height: 200px;
}
.left {
float: right;
width: 200px;
background-color: rebeccapurple;
}
.right {
margin-right: 200px;
background-color: red;
}





暫時想到了兩種。

實現 水平垂直居中
第一種

container{

position:relative;

}

center{

width:100px; height:100px; position:absolute; top:50%; left:50%; transform: translate(-50%,-50%);

}

container{

position:relative;

}

center{

width:100px; height:100px; position:absolute; top:50%; left:50%; transform: translate(-50%,-50%);

}
第二種

container{

position:relative;

}

center{

width:100px; height:100px; position:absolute; top:50%; left:50%; margin:-50px 0 0 -50px;

}

container{

position:relative;

}

center{

width:100px; height:100px; position:absolute; top:50%; left:50%; margin:-50px 0 0 -50px;

}
第三種

container{

position:relative;

}

center{

position:absolute; margin:auto; top:0; bottom:0; left:0; right:0;

}

container{

position:relative;

}

center{

position:absolute; margin:auto; top:0; bottom:0; left:0; right:0;

}
第四種 flex

container{

display:flex; justify-content:center; align-items: center;

}

container{

display:flex; justify-content:center; align-items: center;

}

總結

以上是生活随笔為你收集整理的8.23 前端面经总结的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。