Created
September 17, 2021 18:30
-
-
Save vsim1964/b6b674f4d23dd900ae2b63cb17a52815 to your computer and use it in GitHub Desktop.
Как изменять ширину и высоту строчных элементов
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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>Document</title> | |
<style> | |
body { | |
padding: 20px; | |
} | |
.block { | |
margin-bottom: 20px; | |
padding: 10px; | |
text-align: center; | |
color: white; | |
background-color: #3a78a1; | |
} | |
.inline-absolute { | |
color: white; | |
background-color: rgba(255, 0, 0, 0.5); | |
position: absolute; | |
width: 200px; | |
height: 100px; | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<div class="block">Блок 1</div> | |
<span class="inline-absolute">Строчный элемент</span> | |
<div class="block">Блок 3</div> | |
</body> | |
</html> |
Author
vsim1964
commented
Sep 17, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment