margin padding border
2024-09-03 09:27:28
Difference between margin and padding?
Remember these 3 points:
- The Margin is the extra space around the control.
- The Padding is extra space inside the control.
- The Padding of an outer control is the Margin of an inner control.
Demo Image:(where red box is desire control)
When to use margin vs padding in CSS [closed]
From https://www.w3schools.com/css/css_boxmodel.asp
Explanation of the different parts:
Content - The content of the box, where text and images appear
Padding - Clears an area around the content. The padding is transparent
Border - A border that goes around the padding and content
Margin - Clears an area outside the border. The margin is transparent
Live example (play around by changing the values): https://www.w3schools.com/css/tryit.asp?filename=trycss_boxmodel
最新文章
- javascript判断数字是integer还是float
- python 图片爬虫
- 用Docker Compose启动Nginx和Web等多个镜像
- 大文件下载控件(down2)-示例更新-Xproer.HttpDownloader
- [Android]解决ClickableSpan中点击后ListView中item的长按冲突的问题
- 分层服务提供者(LSP)
- Python 学习开发笔记之IO操作
- linux常用查看硬件设备信息命令(转载)
- C#中精确计时的一点收获
- Android为TV端助力 帧动画
- 数据库 -- mysql表操作
- HTML语言字符编码
- JS笔记(一):基础知识
- checkbox选中并通过ajax传数组到后台接收
- Sonar理论篇
- Android文件的读写
- linux内核分析 第八周读书笔记
- Solidity 官方文档中文版 2_Ethereum 智能合约介绍
- 二、jdk命令之javah命令(C Header and Stub File Generator)
- H5安卓端浏览器如何去除select的边框?
热门文章
- 一些常见css样式加选择器
- Phoenix的jdbc封装
- bash shell脚本之查看当前日期以及登陆用户
- Marketing Cloud里取得系统contact数目的API
- 6.单表的CRUD操作
- 17.SpringMVC核心技术-拦截器
- 文件 file open函数的打开及 函数的调用
- Swift Review总结一:从 Swift Style 开始
- 《数据结构与算法之美》 <;01>;复杂度分析(上):如何分析、统计算法的执行效率和资源消耗?
- 学习笔记:安装swig+用SWIG封装C++为Python模块+SWIG使用说明