一些工作中常用的CSS 发表于 2017-07-11 | 分类于 css | 阅读次数 尝试整理和集合工作中经常遇到的css小技巧… 单行超出省略字12345.div{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } placeholder颜色123input::-webkit-input-placeholder{ color: #666;} 禁止文本选择1234567.div{ -moz-user-select:none; -webkit-user-select:none; -ms-user-select:none; -khtml-user-select:none; user-select:none;} 表单100%宽,但是有padding12345input{ -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;} 横向滚动12345.div{ white-space: nowrap; overflow-x: auto; overflow-y: hidden;} 不断更新