当前位置:网站首页>Background position position NOUN
Background position position NOUN
2022-06-12 08:40:00 【Little boy who likes hot pot】
utilize background—position:x y;
x and y Coordinates can be in azimuth nouns or precise units .
Parameters :(1)position It can be for top、center、bottom、left、center、right etc.
(2)length How much can it be px
1. If both values specified are positional nouns , Then the order of the two values is independent , such as left,top and top,left The effect is the same
Horizontal center :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Background location —— Position NOUN </title>
<style>
div{
width: 300px;
height: 300px;
background-color: pink;
background-image: url(images/logo.png);
/* Background tile */
background-repeat: no-repeat;
/* background-position: Position NOUN ; */
background-position: center top;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
Running effect :

2. Align Center right
Code :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Background location —— Position NOUN </title>
<style>
div{
width: 300px;
height: 300px;
background-color: pink;
background-image: url(images/logo.png);
/* Background tile */
background-repeat: no-repeat;
/* background-position: Position NOUN ; */
background-position: right center;
}
</style>
</head>
<body>
<div></div>
</body>
</html>Running effect :

3. If only one noun is specified , The other value is omitted , The second value is centered by default
(1) right justify
Code :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Background location —— Position NOUN </title>
<style>
div{
width: 300px;
height: 300px;
background-color: pink;
background-image: url(images/logo.png);
/* Background tile */
background-repeat: no-repeat;
/* here , The level must be aligned to the right , The second parameter is omitted y The axis is vertically centered */
background-position: right;
}
</style>
</head>
<body>
<div></div>
</body>
</html> Running effect :

(2) Horizontally Center
Code :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Background location —— Position NOUN </title>
<style>
div{
width: 300px;
height: 300px;
background-color: pink;
background-image: url(images/logo.png);
/* Background tile */
background-repeat: no-repeat;
/* here , The first parameter must be top y Shaft top alignment . The second parameter is omitted x The axis is horizontally centered */
background-position: top;
}
</style>
</head>
<body>
<div></div>
</body>
</html>Running effect :

边栏推荐
- Model Trick | CVPR 2022 Oral - Stochastic Backpropagation A Memory Efficient Strategy
- Knee joint
- The Three Kingdoms kill the surrounding areas -------- explanation of the pig Kingdom kill problem
- This article is required for the popularization of super complete MES system knowledge
- Only use MES as a tool? Looks like you missed the most important thing
- Why should enterprises implement MES? What are the specific operating procedures?
- At present, MES is widely used. Why are there few APS scheduling systems? Why?
- [GUI development] browsing function implementation model of image processing software
- Website colab and kaggle
- (p19-p20) delegate constructor (proxy constructor) and inheritance constructor (using)
猜你喜欢

余压监控系统保证火灾发生时消防疏散通道的通畅,为大型高层建筑的安全运行和人民生命财产安全保驾护航

(p40-p41) transfer and forward perfect forwarding of move resources

Ankerui motor protector has the functions of overload inverse time limit, overload definite time limit, grounding, starting timeout, leakage, underload, phase failure, locked rotor, etc
![[open source project] easycmd command graphical software](/img/7b/4b4d7059a5dd520f3491cc376f41fc.jpg)
[open source project] easycmd command graphical software

Regular expressions in JS

ctfshow web 1-2

Webrtc series - mobile terminal hardware coding supports simulcast

QT realizes multi screen and multi-resolution adaptation

Where does the driving force of MES system come from? What problems should be paid attention to in model selection?

(p21-p24) unified data initialization method: List initialization, initializing objects of non aggregate type with initialization list, initializer_ Use of Lisy template class
随机推荐
API handling Android security distance
2022.6.9-----leetcode.497
Loading circling effect during loading
Judge whether the object is empty
ctfshow web4
Asp Net project add log function
Hands on deep learning -- implementation of multi-layer perceptron from scratch and its concise implementation
动态创建表单并提交
What scheduling rules does the APS software have? What is the exception handling scheme?
[dynamic memory management] malloc & calloc and realloc and written test questions and flexible array
The Three Kingdoms kill the surrounding areas -------- explanation of the pig Kingdom kill problem
Error: ER_ NOT_ SUPPORTED_ AUTH_ MODE: Client does not support authentication protocol requested ... ...
Ankerui fire emergency lighting and evacuation indication system
深拷贝与浅拷贝的区别
When converting tensor to ndarray in tensorflow, the run or Eval function is constantly called in the loop, and the code runs more and more slowly!
Only use MES as a tool? Looks like you missed the most important thing
The era of post MES system has come gradually
In the era of intelligent manufacturing, how do enterprises carry out digital transformation
Lock mechanism in MySQL
ctfshow web 1-2