###### tags: `六角筆記王` `HTML` `CSS` `jQuery` `Emmet` # EMMET快捷鍵大全 [教學網頁](https://pjchender.blogspot.com/2016/07/emmet.html) 使用重點: - 輸入EMMET的關鍵字後,按下TAB鍵,即可產生相對應的語法。 - 關鍵字之間不能為了整潔或其他目的而使用空格。 --- ## HTML - 子層: `>` - 同層: `+` - 不帶樣式的div: `div` - 跳回上層: `^` ![](https://goofy-transport-a54.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F58516935-281c-43ab-afca-6aba41df84f3%2F_2021-07-07_4.11.13.png?table=block&id=03a2d955-66e8-4fca-80af-2ed4d470b074&spaceId=63ab1082-d836-4f90-9640-616e7a0e44a2&width=860&userId=&cache=v2) - 重複的標籤: `*次數` - 綁在一起:`()` 把同層的槽狀結構分開 ![](https://goofy-transport-a54.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fcd7c6e36-b470-426d-9212-e753c097c66e%2F_2021-07-07_4.27.19.png?table=block&id=0459203d-df64-4f7f-85f0-c34b48abcbee&spaceId=63ab1082-d836-4f90-9640-616e7a0e44a2&width=960&userId=&cache=v2) - `lorem20` :可以寫出20個假字 如果在一列式的話可以打 p>lorem20 <br> ## 在HTML增加屬性 - 標籤選擇器命名: `.className` 產生元素時直接加上指定的 .className,例如:h1.title - 有class選擇器的div: `.名字` - 有id屬性的div: `#名字` - 自定義屬性和內容attribute: `[]` ![](https://goofy-transport-a54.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fcdb42324-d6f7-4b1a-add1-eb517f7dd85f%2F_2021-07-07_4.42.43.png?table=block&id=e9054c09-7ffe-47df-a369-dc68115e43f8&spaceId=63ab1082-d836-4f90-9640-616e7a0e44a2&width=860&userId=&cache=v2) - 設定編號: `$` - 起始值: `@` 有時候連續符號不是從1開始 ![](https://goofy-transport-a54.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F8e8f5b13-b1c4-4b94-9788-4e01f0ba187a%2F_2021-07-07_4.55.22.png?table=block&id=9fbc0772-f7b9-4daa-a781-a97c0b780c8e&spaceId=63ab1082-d836-4f90-9640-616e7a0e44a2&width=960&userId=&cache=v2) - 內容: `{}` <br> ## CSS縮寫 ### margin - margin 0 auto: `m0-a` - margin-top: 10px :`mt10` - margin-bottom:auto : `mb-a` ### padding - padding: 10% 20% : `p10p20p` - padding: 10px 20px : `p10px20px` - padding-right: 10px : `pt10` ### box Sizing&長寬 - box-sizing:border-box : `bxz:bb` - box-shadow: `bzsh` - width:30px : `w30` - height:20px : `h20` - max-width:10px :`maw10` - max-height:20px :`mah20` ### border - border-right: `bdr` - border: 3px solid #ffff :`bd3-s#ffff` ### Background - background: `bg` - background: #000 : `bg#000` - background-repeat:no-repeat : `bgrn` ### font-size - font-size:`fz` - font-weight:10px : `fw10` - font-weight:bold : `fwb` - font-weight:bolder : `fwbr` - font-weight:lighter : `fwl` - font-size:16px : `fz16` - font-family : `ff` ### text - text-align:center : `tac` - text-decoration:none : `tdn` - text-decoration:underline 下底線 : `tdu` - line-height: 20px 行高 : `lh20` - letter-spacing: 2px 字元間距控制 : `lts2` - white-space: nowrap 空白區域處理(強制不換行,在同一行內顯示所有內容) : `whsnw` - word-wrap:break-word 單字折行設定(過長的單字會自動折到下一行) : wowb ### float: `fl` - float:left : `fll` ### Lists清單ul.li系列 - list-style:none : `lisn` - list-style-type:none : `listn` - list-style-type:disc : `listd` ### display - display:none : `dn` - display:block : `db` - display:flex : `df` - display:inline : `di` - display:inline-block : `dib` ### overflow - overflow:hidden : `oh` <br> ## Flex系列 ### flex direction - flex-direction:column 直為行 : `fxdc` - flex-direction:row 恆為列: `fxdr` ### justify-content - justify-content:center : `jcc` - justify-content:flex-start : `jcfs` - justify-content:flex-end : `jcfe` - justify-content:space-around : `jcsa` - justify-content:space-between : `jcsb` ### align-items - align-items:center : `aic` - align-items:flex-start : `aifs` - align-items:flex-end : `aife` <br> ## 直式橫式寫 - writing-mode: horizontal-tb 預設是水平顯示(上到下) - writing-mode: vertical-rl 垂直顯示(右到左) - writing-mode: vertical-lr 垂直顯示(左到右) <br> ## jQuery - `jdr`:jqDocReady(基礎環境起手式) - 大部分的語法都是:`jqXXX` 例如點擊效果是:`jqclick` 、顯示效果:`jqshow`