亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

請教grid-template-areas,用stylus怎么寫???出不來應有的效果

用stylus來寫網格區域,引用的時候,出不來效果,正常的css沒問題,特請教。

正在回答

2 回答

寫成一行程序沒問題,程序正常執行

? ? grid-template-areas "title title header header" "time time swiper swiper" "block1 block2 swiper swiper" "block3 block4 swiper swiper" "block5 block6 swiper swiper" "block7 block7 video info"

但是格式很難看,失去了所見既布局的意思,多行的話,代碼沒有執行? ?

?grid-template-areas "title title header header"

? ? ? ? ? ? ? ? ? ? ? ? ???????????"time time swiper swiper"

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?"block1 block2 swiper swiper"

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?"block3 block4 swiper swiper"

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?"block5 block6 swiper swiper"

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?"block7 block7 video info"

1 回復 有任何疑惑可以回復我~
#1

WindBelll

源碼看下
2019-04-08 回復 有任何疑惑可以回復我~
#2

愛米

您好,方便把您寫的源碼發出來看一下嗎?
2019-04-11 回復 有任何疑惑可以回復我~
#3

SuperHulk

1111111
2019-04-19 回復 有任何疑惑可以回復我~
#4

SuperHulk 回復 SuperHulk

111
2019-04-19 回復 有任何疑惑可以回復我~
查看1條回復
給你個例子看看,歡迎采納
<!DOCTYPE?html>
<html>
<head>
?<meta?charset="UTF-8">
?<title>grid-template-areas</title>
?<style>
?*{
??margin:0;
??padding:0;
??list-style:none;
?}
?.container{
??border:1px?solid?#000;
????????width:600px;
????????height:200px;
????????margin:50px?auto;
????????display:grid;
????????/*repeat(repeat,value)函數,只試用于下面兩者*/
????????grid-template-columns:100px?repeat(2,200px)?100px;
????????grid-template-rows:repeat(2,100px);
????????/*第一行與第二行之間用空格隔開即可,需要用雙引號包裹起來*/
????????grid-template-areas:"one?area?area?two"
?????????????"three?area?area?four";
????????/*align-items:center;*/
????????/*justify-items:center;*/
????????text-align:center;
????????line-height:100px;
????????/*place-items:center;*/
?}
?/*相同區域的取同一個名字即可*/
?.container>div:nth-child(1){
??background:blue;
??grid-area:one;
?}
?.container>div:nth-child(2){
??background:#fff;
??grid-area:area;
?}
?.container>div:nth-child(3){
??background:#fff;
??grid-area:area;
?}
?.container>div:nth-child(4){
??background:red;
??grid-area:two;
?}
?.container>div:nth-child(5){
??background:yellow;
??grid-area:three;
?}
?.container>div:nth-child(6){
??background:#fff;
??grid-area:area;
?}
?.container>div:nth-child(7){
??background:#fff;
??grid-area:area;
?}
?.container>div:nth-child(8){
??background:orange;
??grid-area:four;
?}
?</style>
</head>
<body>
?<div?class="container">
??<div>1</div>
??<div></div>
??<div></div>
??<div>2</div>
??<div>3</div>
??<div></div>
??<div></div>
??<div>4</div>
?</div>
</body>
</html>


0 回復 有任何疑惑可以回復我~
#1

蘭亭一夢 提問者

兄弟你好,寫成一行沒問題,多行不行
2019-04-07 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

請教grid-template-areas,用stylus怎么寫???出不來應有的效果

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號