单一要害字 | 等价的关键字 |
---|---|
center | center center |
top | top center 或 center top |
bottom | bottom center 或 center bottom |
right | right center 或 center right |
left | left center 或 center left |
百分数值
百分数值的透露表现法子更加复杂。假设你企望用百分数值将图像在其元素中居中,这很简单:
body { bac公斤round-image:url('/i/eg_bg_03.gif'); bac公斤round-repeat:no-repeat; bac公斤round-position:50% 50%; }
这会招致图象适当放置,其焦点与其元素的核心对齐。换句话说,百分数值同时使用于元素与图像。也等于说,图象中形貌为 50% 50% 的点(中心点)与元素中刻划为 50% 50% 的点(外围点)对齐。
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c53388.shtml