<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當前位置: 首頁 - 科技 - 知識百科 - 正文

        flex布局方法(css3彈性伸縮布局教程)

        來源:懂視網 責編:小OO 時間:2020-11-27 18:51:54
        文檔

        flex布局方法(css3彈性伸縮布局教程)

        container{align-items: center;justify-content: center;display: flex;background: white url(image/baby.jpg) no-repeat center;background-size: auto 100%;}.text{display: flex;align-items: center;height: 3rem;color: white;font-family: helvetica.sans-serif;font-size: 1.5rem;font-weight: bold;text-transform: uppercase;text-shadow:0 0 1.2rem hsla(0,100%,100%,.4);box-shadow: 0 0 1.5rem hsla(0,100%,0%,.4);border-radius: .5rem;}。
        推薦度:
        導讀container{align-items: center;justify-content: center;display: flex;background: white url(image/baby.jpg) no-repeat center;background-size: auto 100%;}.text{display: flex;align-items: center;height: 3rem;color: white;font-family: helvetica.sans-serif;font-size: 1.5rem;font-weight: bold;text-transform: uppercase;text-shadow:0 0 1.2rem hsla(0,100%,100%,.4);box-shadow: 0 0 1.5rem hsla(0,100%,0%,.4);border-radius: .5rem;}。

        這篇文章主要為大家詳細介紹了CSS3彈性伸縮布局之flex布局,具有一定的參考價值,感興趣的小伙伴們可以參考一下

        .container{
        	align-items: center;
        	justify-content: center;
        
        	display: flex;
        	background: white url(image/baby.jpg) no-repeat center;
        	background-size: auto 100%;
        }
        
        .text{
        	display: flex;
         	align-items: center;
        	height: 3rem;
        
        	color: white;
        	font-family: helvetica, sans-serif;
        	font-size: 1.5rem;
        	font-weight: bold;
        	text-transform: uppercase;
        	text-shadow:0 0 1.2rem hsla(0,100%,100%,.4);
        	box-shadow: 0 0 1.5rem hsla(0,100%,0%,.4);
        	border-radius: .5rem;
        }

        適應各種版本:

         html {
        	height: 100%;
        	font-size: 62.5%; /* 10px with default settings */
        	} 
        	body {	
        	margin: 0;
        	height: 100%;
        	width: 100%; /* width needed for Firefox */
        
        	/* old flexbox - Webkit and Firefox. For backwards compatibility */
        	display: -webkit-box; display: -moz-box;
        	/* middle-aged flexbox. Needed for IE 10 */
        	display: -ms-flexbox;
        	/* new flexbox. Chrome (prefix), Opera, upcoming browsers without */
        	display: -webkit-flex;
        	display: flex;
        	
        	/* old flexbox: box-* */
        	-webkit-box-align: center; -moz-box-align: center;
        	/* middle flexbox: flex-* */
        	-ms-flex-align: center;
        	/* new flexbox: various property names */
        	-webkit-align-items: center;
        	align-items: center;
        	
        	
        	-webkit-box-pack: center; -moz-box-pack: center;
        	-ms-flex-pack: center;
        	-webkit-justify-content: center;
        	justify-content: center;
        	
        	background: white url(image/baby.jpg) no-repeat center;
        	background-size: auto 100%;
        	}
         	
         	/* 	flexbox added below to show it works with anonymous boxes (e.g. text) as well
         	It is not needed to center the heading itself.
         	Rest of the styles are just to make the demo pretty and can be ignored.
         	*/
        	h1 {
        	display: -webkit-box; display: -moz-box;
        	display: -ms-flexbox;
        	display: -webkit-flex;
        	display: flex;
        	
        	-webkit-box-align: center; -moz-box-align: center;
        	-ms-flex-align: center;
        	-webkit-justify-content: center;
        	justify-content: center;
        	
        	-webkit-box-pack: center; -moz-box-pack: center;
        	-ms-flex-pack: center;
        	-webkit-align-items: center;
        	align-items: center;
        	
        	height: 10rem;
        	padding: 0 3rem;
        	
        	/* background-color: hsla(0, 100%, 0%, .9); */
        	color: white;
        
        	font-family: helvetica, sans-serif;
        	font-size: 5rem; /* font shorthand doesn’t work with rem in IE10 */
        	text-transform: uppercase;
        	text-shadow: 0 0 1.2rem hsla(0, 100%, 100%, .4);
        
        	box-shadow: 0 0 1.5rem hsla(0, 100%, 0%, .4);
        	border-radius: .5rem;
        	}

        對齊設置:在容器中設置元素對齊,而不是設置元素本身。

        單位:px 像素,相對于分辨率;em 相對于當前對象內文本的字體尺寸;rem(root em)相對于網頁根元素文本字體尺寸。

        需要學習CSS的同學請關注Gxl網CSS視頻教程,眾多css在線視頻教程可以免費觀看!

        聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        flex布局方法(css3彈性伸縮布局教程)

        container{align-items: center;justify-content: center;display: flex;background: white url(image/baby.jpg) no-repeat center;background-size: auto 100%;}.text{display: flex;align-items: center;height: 3rem;color: white;font-family: helvetica.sans-serif;font-size: 1.5rem;font-weight: bold;text-transform: uppercase;text-shadow:0 0 1.2rem hsla(0,100%,100%,.4);box-shadow: 0 0 1.5rem hsla(0,100%,0%,.4);border-radius: .5rem;}。
        推薦度:
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 久久亚洲精品成人| 亚洲色偷偷综合亚洲AV伊人| 亚洲日本在线看片| 免费毛片a线观看| 亚洲AV永久无码精品水牛影视 | 久久亚洲高清观看| 久久成人永久免费播放| 丝袜熟女国偷自产中文字幕亚洲| 中文字幕永久免费视频| 久久久久亚洲精品影视| 日本免费网站视频www区| 亚洲中文字幕一二三四区苍井空| 大地资源二在线观看免费高清| 亚洲国产精品人久久电影| 日韩中文字幕精品免费一区| 亚洲日韩AV一区二区三区四区 | 亚洲三级在线免费观看| 亚洲一久久久久久久久| 国产91在线免费| GOGOGO高清免费看韩国| 亚洲精品视频在线观看免费| 中字幕视频在线永久在线观看免费| 国产成人精品亚洲日本在线| 国产免费拔擦拔擦8x| 中文在线免费观看| 亚洲日本香蕉视频| 在线观着免费观看国产黄| 高清永久免费观看| 精品亚洲AV无码一区二区三区| 免费一级一片一毛片| 日韩免费电影网站| 亚洲日本在线电影| 日韩va亚洲va欧洲va国产| 免费下载成人电影| 一区二区3区免费视频| 666精品国产精品亚洲 | 男人的天堂av亚洲一区2区| 亚洲情XO亚洲色XO无码| 我要看免费的毛片| 国产在线精品免费aaa片| 亚洲色欲色欲www在线播放|