@charset "UTF-8"; * { margin: 0; padding: 0; } li { list-style: none; } body { font-size: 16px; } /* div 元素 多行注释 编译后 .css文件中会保留 */ /*! 强制显示 编译后 .min.css文件中 会保留 */ div { background: #000; color: #eee; width: 100px; } #list { width: 100px; height: 20px; } #list li { font-size: 12px; } #list li p { padding-top: 30px; padding-left: 10px; } #list-inner { color: #000; } .link { color: #000; } .link:hover { color: #eee; } .login-btn { width: 100px; height: 40px; line-height: 40px; text-align: center; border-radius: 5px; color: #eee; background: #000; } .submit-btn { width: 50px; height: 50px; line-height: 50px; text-align: center; border-radius: 5px; color: #eee; background: #000; } .del-btn { width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 5px; color: #eee; background: #000; } .aa-btn { width: 300px; height: 20px; line-height: 20px; text-align: center; border-radius: 5px; color: #eee; background: #000; } .wrapper, .wrapper .inner, #main { width: 100px; height: 100px; font-size: 10px; } .wrapper .inner, #main .inner { padding: 20px; } #main { margin: 10px; } /* 绝对值: abs(-10px) 四舍五入:round(5.5) 向上取整:ceil(5.5) 向下取整:floor(5.5) 百分比:percentage(30px / 100px) 最小值: min(1,2,3) 最大值:max(1,2,3) */ .content { width: 30%; } div { width: 60px; } p { border: 1px solid #000; background: yellow; } li { font-size: 12px; } .list-1 { width: 100px; } .list-2 { width: 200px; } .list-3 { width: 300px; } .none-1 { width: 50px; } .none-2 { width: 100px; }