The background-position property in CSS allows you to move a background image (or gradient) around within its container.
We will discuss the background-position property below, exploring examples of how to use this property in CSS. Using Fixed Let's look at a CSS background-position example where we use a fixed value. div { background-image: url("/images/logo.png"); background-position: 0px 45px; } ...
CSS property is used to specify the starting position of a background image within its containing element. It allows web developers to control the alignment of the background image both horizontally and vertically. This property takes two values: the first value represents the horizontal position (...
CSS - background-position Property - CSS background-position property sets the initial position of the element's background image. The position of the image is relative to the value set by background-origin property.
在CSS中,背景图片的定位方位有3种: 1)关键字:background-position: top right; 2)像素:background-position: 0px 0px; 3)百分比:background-position: 0% 0%; 上面这三句语句,都将图片定位在背景的左上角,表面上看效果是一样的,实际上第三种定位机制与前两种完全不同。
CSS背景定位属性background-position可以用来设置背景图像的位置。 可以使用以下值来设置background-position属性: 关键字:left、center、right、top、bottom,分别表示背景图像在容器内的左、中、右、上、下位置。 百分比值:使用百分比值来设置背景图像的位置,例如50% 50%表示背景图像在容器的中心位置。 像素值:使用像素...
The background-position CSS property sets the initial position for each background image. The position is relative to the position layer set by background-origin.
设置背景位置的 CSS 语法如下 : background-position : length length background-position : position position 1. 2. background-position 属性值 可以是 length 长度 , 也可以是 position 方位 ; length 长度 : 百分数 :如 50% ; 浮点数 + 单位 :如 : 150.5px ; ...
Property values String format CSS information 顯示其他 4 個 Specifies the position of the background of the object. Syntax 複製 Integer value = object.put_backgroundPosition( v);Integer value = object.get_backgroundPosition(* sPosition); ...