![](/img/trans.png)
[英]how to make effect pull from top to bottom 1 page like android title bar use css3
[英]how to use css to center page title?
我有一個漢堡菜單,當點擊它時,它會向兩個方向擴展,我還有一個頁面標題,我希望它以頁面為中心,但它不想工作。 到目前為止,我最幸運的是添加了一個邊距,但是當我單擊漢堡菜單時標題會移動。 在求助於詢問之前,我嘗試了幾種選擇,但它們似乎都破壞了代碼或什么也不做。 下面是與當前圖像對應的圖像和代碼。
#top {
display:flex;
background-color:black;
width:100%;
height: 200px;
padding:5px;
}
#top #menu {
width:30px;
height:30px;
border: 2px solid white;
}
#top h1{
display:flex;
flex-direction:row;
color:red;
justify-content:center;
}
嘗試文本對齊:居中; 而不是 justify-content: center;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.