margin
英 [ˈmɑ:dʒɪn] 美 [ˈmɑ:rdʒən]
n.边缘,范围;极限;利润,盈余;(版心外)的空白
vt.留边;成为…的边;加边于,围绕;为…加旁注
复数: margins
top
英 [tɒp] 美 [tɑ:p]
n.顶,顶部;(箱子)盖,(书页等的)上栏;首席;陀螺
adj.最高的;顶上的;头等的;最大的
vt.形成顶部;达到…的顶端;处于…的最前头;领导
vi.总结;超越;高耸;结束
第三人称单数: tops 复数: tops 现在分词: topping 过去式: topped 过去分词: topped
css margin-top属性 语法
margin-top是什么意思?
margin-top是上外边距的意思,是CSS属性的一种,用来网页中设置元素的上外边距,比如:margin-top: 50px;允许使用负值,所有主流浏览器都支持 margin-top 属性。
作用:设置元素的上外边距。
说明:允许使用负值。
注释:所有主流浏览器都支持 margin-top 属性。
css margin-top属性 示例
<html>
<head>
<style type="text/css">
p.topmargin {margin-top: 50px}
</style>
</head>
<body>
<p>这个段落没有指定外边距。</p>
<p class="topmargin">这个段落带有指定的上外边距。</p>
</body>
</html>运行实例 »
点击 "运行实例" 按钮查看在线实例
热门推荐
- css 元素无法固定在页面顶部怎么办_position fixed top 0 使用
- css 想让浮动元素垂直居中怎么办_position relative 与 top transform 配合
- css 如何实现卡片式布局_使用 box-shadow padding margin 与 border-radius
- css 想制作简易模态框怎么办_position fixed top left 与 z-index
- css 想实现工具提示显示在元素上方怎么办_position absolute top -值使用
- css定位元素总是偏离目标位置怎么办_通过position:left/top与transform:translate组合实现精准定位