如题所述
background:.enter
bottom
no-repeat;前面是url路径
全部的位置代码如下:
background-position:
left;
代表背景图横向(x轴)靠左,纵向(y轴)居中。(9点钟位置)
background-position:
right;
代表背景图横向(x轴)靠右,纵向(y轴)居中。(3点钟位置)
background-position:
top;
代表背景图横向(x轴)居中,纵向(y轴)靠上。(12点钟位置)
background-position:
bottom;
代表背景图横向(x轴)居中,纵向(y轴)靠下。(6点钟位置)
background-position:
center;
代表背景图横向(x轴)居中,纵向(y轴)居中。(绝对居中)
background-position:
left
top;
代表背景图横向(x轴)靠左,纵向(y轴)靠上。(10点钟位置)
background-position:
left
bottom;
代表背景图横向(x轴)靠左,纵向(y轴)靠下。(7点钟位置)
background-position:
right
top;
代表背景图横向(x轴)靠右,纵向(y轴)靠上。(1点钟位置)
background-position:
right
bottom;
代表背景图横向(x轴)靠右,纵向(y轴)靠下。(5点钟位置)
bottom
no-repeat;前面是url路径
全部的位置代码如下:
background-position:
left;
代表背景图横向(x轴)靠左,纵向(y轴)居中。(9点钟位置)
background-position:
right;
代表背景图横向(x轴)靠右,纵向(y轴)居中。(3点钟位置)
background-position:
top;
代表背景图横向(x轴)居中,纵向(y轴)靠上。(12点钟位置)
background-position:
bottom;
代表背景图横向(x轴)居中,纵向(y轴)靠下。(6点钟位置)
background-position:
center;
代表背景图横向(x轴)居中,纵向(y轴)居中。(绝对居中)
background-position:
left
top;
代表背景图横向(x轴)靠左,纵向(y轴)靠上。(10点钟位置)
background-position:
left
bottom;
代表背景图横向(x轴)靠左,纵向(y轴)靠下。(7点钟位置)
background-position:
right
top;
代表背景图横向(x轴)靠右,纵向(y轴)靠上。(1点钟位置)
background-position:
right
bottom;
代表背景图横向(x轴)靠右,纵向(y轴)靠下。(5点钟位置)
温馨提示:答案为网友推荐,仅供参考
第1个回答 2020-09-10
用弹性盒子,上下左右全部居中。简单粗暴快速直接。