margin-top,margintop和paddingtop

http://www.itjxue.com  2023-01-20 11:04  来源:未知  点击次数: 

CSS里border-top和margin-top什么意思?

*margin-top:7px;这个表示在ie6和ie7中的外边距是7px

假如#gaga{margin-top:10px;*margin-top:7px;_margin-top:5px;}

这样第一个就是ie8以上的浏览器、firefox、谷歌浏览器、苹果浏览器这些主浏览器的的外边距是10px,ie7的外边距为7px,ie6则为5px;

*还会代表是通配符的意思,就是可以查找到所有的元素,比如*{margin:0;}这样就代表所有的元素的外边距margin值为0,希望可以帮到你

margin-top是什么意思

margin-top

上边距;上边距属性;顶端边距

例句

1.When printing lists, contains the number of lines on the top margin.

在打印清单时,包含了顶端空白的行数。

2.Under Spacing, type in the values you want for Side Margin, Top Margin, Horizontal Gap, and Vertical Gap.

在“间距”下,键入“侧边距”、“上边距”、“水平跨度”和“垂直跨度”的值。

3.When you open a document, is the insertion point at the top left corner of the page, as if there were no top margin?

打开文档时,插入点是否在页面的左上角,就好像没有上边距?

4.A gutter margin setting adds extra space to the side margin or top margin of a document that you plan to bind .

装订线边距设置将为要装订的文档两侧或顶部边距添加额外的空间。

5.Form: Mint, single, with top margin.

形式:单枚新票,带上边纸。

css中margin-top和top有什么区别

一、功能不同

1、margin-top:功能为设置元素的上外边距。

2、top:规定元素的顶部边缘。

二、特点不同

1、margin-top:允许使用负值。定义固定的上外边距。默认值是 0。

2、top:定义了一个定位元素的上外边距边界与其包含块上边界之间的偏移。

三、规定不同

1、margin-top:所有主流浏览器都支持 margin-top 属性。

2、top:如果 "position" 属性的值为 "static",那么设置 "top" 属性不会产生任何效果。

参考资料来源:百度百科-CSS top

参考资料来源:百度百科-CSS margin-top

(责任编辑:IT教学网)

更多

相关mac苹果系统文章

推荐mac苹果系统文章