我正嘗試使用http://designshack.net/articles/css/build-an-animated-photo-wall-with-css/ 在我的導軌應用中實現照片牆。我插入的列表,段落和圖像的CSS,在圖像高度和寬度,像這樣的唯一改變了我的custom.css.scss:導軌資產管道:無效的CSS
/* picture wall */
/*------CONTAINER------*/
.container {
width: 320px;
margin: 0 auto 50px auto;
}
/*------LIST------*/
.container ul {
list-style-type: none;
}
.container li {
float: left;
position: relative;
width: 280px;
height: 187px;
overflow: hidden;
}
.container li:hover {
cursor: pointer;
}
/*------PARAGRAPH------*/
.container li p {
color: transparent;
background: transparent;
font: 200 10px/80px 'Arvo', Helvetica, Arial, sans-serif;
text-align: center;
text-transform: uppercase;
position: absolute;
top: 0;
left: 0;
width: 80px;
height: 80px;
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
}
.container li:hover p {
color: white;
background: #000; /*fallback for old browsers*/
background: rgba(0,0,0,0.7);
}
/*------IMAGES------*/
.container img {
width: 80px;
height: 80px;
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
}
.container li:hover img {
width: 100px;
height: 100px;
}
資產管道拋出該文件中的以下錯誤:
Invalid CSS after " position:": expected pseudoclass or pseudoelement, was " absolute;"
註釋掉位置線帶來了文件中的下一行:
Invalid CSS after " top:": expected pseudoclass or pseudoelement, was " 0;"
語法問題?我能不能簡單地把有效的CSS放入scss文件中?是什麼賦予了?
你能發佈更多的CSS代碼嗎? –
請向我們展示您的CSS。 – vee
@vinodadhikary剛剛編輯添加我複製和更改的 –