word-wrap: break-word; /*自動換行*/
word-break: break-all; /*自動換行*/
/*保持文本不換行,超出部分已省略號顯示*/ .ellipsis { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
/*p標籤首行縮進兩個字符*/ p { text-indent: 2em; }
/*去除Chrome等瀏覽器文本框默認發光邊框*/ input:focus, textarea:focus, select:focus, button:focus { outline: none; } /*去除IE10+瀏覽器文本框後面的小叉叉*/ input::-ms-clear { display: none; } /*禁止多行文本框textarea拖拽*/ textarea { resize: none; }
/*媒體查詢自適應*/ @media only screen and (max-width: 400px) { body { background-color: lightblue; } }
/*隱藏滾動條開始*/ html { overflow-y: scroll; } :root { overflow-y: auto; overflow-x: hidden; } :root body { position: absolute; } body { width: 100vw; } /*隱藏滾動條結束*/