box-sizing
2024-09-16 12:58:49
Over the generations, people realized that math is not fun, so a new CSS property called box-sizing
was created. When you set box-sizing: border-box;
on an element, the padding and border of that element no longer increase its width. Here is the same example as the previous page, but with box-sizing: border-box;
on both elements:
.simple {
width: 500px;
margin: 20px auto;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.fancy {
width: 500px;
margin: 20px auto;
padding: 50px;
border: solid blue 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
最新文章
- Entity Framework Core 实现MySQL 的TimeStamp/RowVersion 并发控制
- DNS域传送漏洞利用
- Python中import的使用
- swift文件上传及表单提交
- IOS5基础教程之一-----如何创建XCode项目
- BigDecimal的equals
- HDU 1059 Dividing(多重背包)
- 禁止页面复制功能 js禁止复制 禁用页面右键菜单
- R安装
- GC对象分配规则
- FORM开发实现动态LOV
- hadoop 测试框架
- CF 528D. Fuzzy Search NTT
- Jquery版本对IE浏览器的支持
- 【Mybatis】MyBatis之表的关联查询(五)
- 模块热替换 HMR
- ORACLE数据恢复方法(提交事务也可以)
- flask 操作数据时,db的要在app.config设置之后声明:如app.config['SQLALCHEMY_DATABASE_URI']
- SQL group BY 合并字段用逗号隔开
- ActiveX IE保护模式下的低权限操作路径及Windows操作系统特殊路径
热门文章
- AIM Tech Round 3 (Div. 2) B 数学+贪心
- ubuntu上面安装eclipse android到adt下载方法
- Ubuntu将新增磁盘挂载到home下
- 1209:Catch That Cow(bfs)
- (转)Hadoop之常见错误集锦
- 原生的ajax(json)
- HDU 5176 The Experience of Love 带权并查集
- angularJS在本机运行时的注意事项
- [转帖]完美解决NVIDIA最新显卡驱动无法安装。(修改教程篇,各机型都可以)
- iOS之Xcode修改应用图标