? ???
BEM ? SMACSS? ?? CSS ?? ?? ??? CSS ??? ???? ?? ???? SASS? ???? ??? ???? ???? ?? ???? ??? ? ? ????.
-
? Humanifed-BEM Mixin? ?? ?? ??? ??? ?? ?? ???? ?? ???? ?????? ?? ?????? ?? ?? ???? ??? ? ????.
-
Sass? ????
? ? ?????? ?? ??? ???? ? ??? ? ? ????. ??? ?? ? ?? ?? ???? ??? API? ???? ?? ?? - ?? ???? ?? ? ????. ? ?????? ??? ? ? ??? ???? ?? ???? ? ??? ???? ?????. ?? ??? ??
-
?? ?? ??? ???? ?? ???? ?? ? ? ??? ?? SASS?? ???? ?? ???????. Sass 3.3 ??? ??? ??? ???????. ?? ?? ??, ?? ??? ??? ?? ?????, ???? ??? ??? ? ? ??? ? ?? ???? ???????. Natalie Weizenbaum ?? ???? ??? ?? ??? ?????.
pros
bem mixin
<code>.foo { // .foo 的樣式 &-bar { // .foo-bar 的樣式 } }</code>
<code>.media { // .media 塊的樣式 &__img { // .media__image 元素的樣式 &--full { // .media__image--full 修改后的元素的樣式 } } &--new { // .media--new 修飾符的樣式 } }</code>
pros
? ??? BEM? ?? ??? ???? ???? ?? ??? API? ?????.<code>.media {} .media__img {} .media__img--full {} .media--new {}</code>
??
??? Mixin ?? ??? ???, ??? ???? ???? ???? ?? ?? ?? ???? ??? ??? ?? ???? ???? ????. -
?? ?? Mixins? ?? ?? ???? ?? ????? ?? ? ??? ?? ??? ?? ?? ????. B? M? ?? ?? ??? ? ????.
??? ? ? ??
???, ?? Anders Schmidt Hansen? ??? BEM? ?? ???? ?????. ????? ? ??? ?? ? ????? ???? ?? ?? ?? ?? ??? ??? ??? ????.
-
? ??, ??? ? ??? ?? ? ?? ??? ??? ??? ?????? ??? ???? ??? ?? ?? ??? ?????.
-
anders? ??? ????? (..) ? Holds (..) Mixin. ?? ????? ? ?? (..) Mixin? ???????. ??? ??? ??? ?? ?????? ? ??? ??? ? Mixin? ??? ?? ?? ????.
pros
? ???? ?? IS (SMACSS? ?? ??)? ???? ? ??? ???? ??? ??? ??? ???? ????? ? ??????.
? ??? ?? ??? (? ?? BEM)? ????? ???? ? ?? ??? ? ????.
??
<code>@mixin element($element) {
&__#{$element} {
@content;
}
}
@mixin modifier($modifier) {
&--#{$modifier} {
@content;
}
}</code>
? ?? ?? ?, ? ?? ?? ?? ??? ???? ?? ??? ?? ?? ?? ??? ??. CSS ???? ?? ??? ?? ?? ?? ?? ?? ?? ??? ?? ???? ?? ????.
??? ?? ?????? ?? ??? ? ? ????. ??? ?? ????.
<code>.media {
// .media 塊的樣式
@include element("image") {
// .media__image 元素的樣式
@include modifier("full") {
// .media__image--full 修改后的元素的樣式
}
}
@include modifier("new") {
// .media--new 修飾符的樣式
}
}</code>
?? ??
<code>.media {
// .media 塊的樣式
@include e("image") {
// .media__image 元素的樣式
@include m("full") {
// .media__image--full 修改后的元素的樣式
}
}
@include m("new") {
// .media--new 修飾符的樣式
}
}</code>
??? ??? ???? SASS? ?? ???? ?? ???? ??? ???? ?? ??? ??? ?????? ?? ? ? ?????. ??? ?? ??? ????? ??? ??? ? ??? ???? ???? ???? ??????
?? ??? ?? ??? ????? ?? ? SASS ??? ???? ?? ??? (.B {& __ e {}})? ???? ????.
- Kaelig (@kaelig) 2014 ? 3 ? 12 ?
-
???, ??, ?? Sass?? CSS ???? ???? ?? ?? ???? ??? ????. ?? ?? ??? ?? ??? ???? ????. ??? ??? ?? ?? ?? ??? ??? ? ??? ????.
?? ??? ????? ??? ? ? ??? ??? ???? ????? ?? ? ? ????. ?? ???? ???? ?? ? ????? ??? ??? ???? ????? ??? CSS? ? ??? ??? ??? ? ?? ?? ? ????.
??? ???? ?????.
- Hugo Giraudel (@hugogiraudel) 2015 ? 5 ? 19 ?
SASS ??? ? CSS ??? ??? ??? ?? FAQ
SASS ??? ? CSS ??? ???? ???? ??? ??????
SASS ??? ? CSS ??? ???? ???? ?? ???? ??? ?? ???? ??? ??? ???? ? ??????. Sass (Syntacly Awesome ??? ??? ????)? ???? ??, ?? ??, Mixin ? ??? ??? ? ??? CSS ??? ??? CSS??? ????? ??? ? ? ??????. ??? ? ??? ???? ???? ??? ?? ??? ??? ?? ??? ??? ?? ????? ?? ????? ? ????. ?? CSS ??? ?? ?? ???? ?? ?? ?? ???? ? ????.
Sass?? ??? ?? ???? ???? ??? ??????
?? ???????? ??? ?? ???? SASS?? ?? ??? ???? ??? ???? ? ??? ? ????. ?? ?? ??? ?? ??? "*"? ???? ?? ??? ????? ? ????. ??? Sass? ??? ?? ??? ??? ?? ???? ????. ??? ??? ?? ???? ???? ??? ????? ?? ??? ??? ?? ?? ??? ???????. ?? ??, ???
? ???? ??? ??? "???"? ???? ?? ??? ????? ? ????.
Sass? ??? ???? @extend ???? ??? ? ?????
?, @extend ???? Sass?? ??? ???? ?? ??? ? ????. @extend ???? ? ???? ?? ???? ???? ???? ? ??????. ?? CSS ??? ???? ??? ? ?????. ?? ??, ??? ???? ?? ???? ? ?? ?????? ?? ? ????? ?? ???? ??? ?? @extend ???? ???? ??? ???? ?? ???? ?? ? ? ????.
SASS? ???? CSS ????? ????? ???? ??? ??????
SASS? CSS ????? ????? ???? ? ????? ? ?? ??? ?????. ?? ? ??? Nesting??, HTML ??? ???? ?? ???? CSS ???? ?? ? ? ????. ?? ?? CSS ??? ?? ?? ?? ?? ? ? ??????. ?? ??? ??? ??? ??? ?? ?? ? ? ????. ??? ??, ?? ? ??? ?? ???? ???? ???? ? ?????.
SASS ??? ? CSS ??? ???? ?????? ?? ??? ??????
SASS ??? ? CSS ??? ???? ?????? ? ?? ?? ??? ????. ?? ?? ? ??? ???? ??? ? ????? ??? ????. ?? ?? ???? ??? ?? ??? ??? ??? ?? ?? ? ? ????. ? ?? ?? ??? ???? ??? ??? ???? ??? ?? ?? ??? ???? ????. ?? ?? CSS ??? ?? ?? ?? ?? ? ? ??????. ?? BEM (??, ??, ?? ?)? ?? ??? ??? ?? ??? ???? ?? ??? ?? ????? ?? ????? ? ????? ?? ?? ????.
- ?? ?? Mixins? ?? ?? ???? ?? ????? ?? ? ??? ?? ??? ?? ?? ????. B? M? ?? ?? ??? ? ????.
- ? ??, ??? ? ??? ?? ? ?? ??? ??? ??? ?????? ??? ???? ??? ?? ?? ??? ?????.
-
anders? ??? ????? (..) ? Holds (..) Mixin. ?? ????? ? ?? (..) Mixin? ???????. ??? ??? ??? ?? ?????? ? ??? ??? ? Mixin? ??? ?? ?? ????.
pros ? ???? ?? IS (SMACSS? ?? ??)? ???? ? ??? ???? ??? ??? ??? ???? ????? ? ??????. ? ??? ?? ??? (? ?? BEM)? ????? ???? ? ?? ??? ? ????.
?? ??
SASS ??? ? CSS ??? ??? ??? ??
<code>@mixin element($element) {
&__#{$element} {
@content;
}
}
@mixin modifier($modifier) {
&--#{$modifier} {
@content;
}
}</code>
? ?? ?? ?, ? ?? ?? ?? ??? ???? ?? ??? ?? ?? ?? ??? ??. CSS ???? ?? ??? ?? ?? ?? ?? ?? ?? ??? ?? ???? ?? ????. <code>.media {
// .media 塊的樣式
@include element("image") {
// .media__image 元素的樣式
@include modifier("full") {
// .media__image--full 修改后的元素的樣式
}
}
@include modifier("new") {
// .media--new 修飾符的樣式
}
}</code>
<code>.media {
// .media 塊的樣式
@include e("image") {
// .media__image 元素的樣式
@include m("full") {
// .media__image--full 修改后的元素的樣式
}
}
@include m("new") {
// .media--new 修飾符的樣式
}
}</code>
? ???? ??? ??? "???"? ???? ?? ??? ????? ? ????.
?, @extend ???? Sass?? ??? ???? ?? ??? ? ????. @extend ???? ? ???? ?? ???? ???? ???? ? ??????. ?? CSS ??? ???? ??? ? ?????. ?? ??, ??? ???? ?? ???? ? ?? ?????? ?? ? ????? ?? ???? ??? ?? @extend ???? ???? ??? ???? ?? ???? ?? ? ? ????.
SASS? CSS ????? ????? ???? ? ????? ? ?? ??? ?????. ?? ? ??? Nesting??, HTML ??? ???? ?? ???? CSS ???? ?? ? ? ????. ?? ?? CSS ??? ?? ?? ?? ?? ? ? ??????. ?? ??? ??? ??? ??? ?? ?? ? ? ????. ??? ??, ?? ? ??? ?? ???? ???? ???? ? ?????.
? ??? SASS? CSS ??? ???? ??????? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











CSS? ??? ??? ????? ????? ??? ? ?? CSS? ????? ?? ??????, ?? ?? ? ??? ??, ??? ?? ?? ??? CSS ? ????? ?? ??? ?? ???? ???? ??? ??? ???. 1. ?? CSS? ???? HTML? ?? ?????. 2. JavaScript? ?? ??? CSS ??; 3. ??? ??? ???? ?? ???? ????? ??????. 4. CSS? ???? ???? ??? ????. ?? CSS? ???? ?? ??? ???? Rel = "Preload"?????? ????, ??? ?? ??? ????? ???? ??? ?? ? ??? ???? ??? ?????.

TheBestoproachforcssdspectionseproject'sspecificneeds.forlargerProjects, externalcsSisbetterduetomainabainabainabilitableability ? forsmallerprojectsorsingle-pageapplications, ?? csmightbemoresuitable.it 'scrucialtobalanceprojectsize, ??

???, cssdoesnothavetobeInlowercase. ???, lowercaseisRecomedended for : 1) ??? ? ??, 2) ??? ?? rorsinerrorsinerrorsIngerRorsIngerRorsInteChnologies, 3) ??? ?? ??, ? 4) ?? ? ???? ????.

cssismostlycase-Insensitive, buturlsandfamilynamesarecase-insensitive.1) propertiesandvalueslikecolor : red; anteOtcase-inditive.2) urlsmustmatchtheserver'scase, ?? ??,/images/logo.png.3) fontfamilynames'opens'mustoccase.

AutoPrefixer? ?? ???? ??? ???? ?? ?? ???? CSS ??? ???? ???? ?????. 1. ????? ???? ???? ???? ??? ?????. 2. PostCSS ???? ??, CSS? ?? ???? ???? ?? ???? ??? ???? ??? ?? ??? ?????. 3. ?? ???? ???? ??, ??????? ?? ? ?? ???????? ????? ?? ?????. 4. ???? ???? ???? ???? ?? ?? ????, ???? ?? ??? ?? ???? ???? ????? ?? ???? ?? ????.

CSSCOUNTERSCANAUTOMALLYNUMBERSESSESSENDS.1) USECOUNTER-RESETTIONITIALIZE, CORKENT-INCREMENTTOINCERES, andCOUNTER () ORCOUNTERS () TODISPLAYVALUES.2) COMPINEWITHJAVAISCRIPTORDINAMICCONTENTTOEREACCUTERUPDATES.

CSS?? ??? ? ?? ??? ?? ??? ???? ??, ??, URL ? ??? ?? ????? ?? ?? ??? ?????. 1. ???? ?? ??? ??? ? ???? ?? ?? ??? ??????. 2. ?? 16 ?? ??? ?? ??? ?????, ??? ???? ???? ?? ??? ??? ???? ????. 3. URL? ??? ???? ???? ??? ??? ? ????. 4. ??? ?? ?? (??)? ??? ???? ??? ? ???? ??????? ???????.

cssselectorsandpropertynamesarecase-inensensitive, whilevaluescanbecase-sensitivendependingOntext.1) selectorsike'div'and'div'areequivalent.2) propertiessuchas'background'and'background-color'AretreatedThesame.3) ValueLikecolornames-insens
