We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64d018e commit 59b4696Copy full SHA for 59b4696
howto/object-fit.html
@@ -7,25 +7,22 @@
7
CSS Solutions: How to fill a box with an image without distorting it
8
</title>
9
<link rel="stylesheet" href="styles.css" />
10
- <style>
+ <style class="editable">
11
.wrapper {
12
height: 200px;
13
display: flex;
14
gap: 20px;
15
}
16
17
.box {
18
- flex: 1;
19
border: 5px solid #000;
20
- border-radius: 0.5em;
21
22
- </style>
23
24
- <style class="editable">
25
.box img {
26
width: 100%;
27
height: 100%;
28
+
29
.box1 img {
30
object-fit: cover;
31
@@ -50,6 +47,16 @@
50
47
</section>
51
48
52
49
<textarea class="playable playable-css" style="height: 300px">
+.wrapper {
+ height: 200px;
+ display: flex;
53
+ gap: 20px;
54
+}
55
56
+.box {
57
+ border: 5px solid #000;
58
59
60
61
62
0 commit comments