create image map container
create container div style and position with css
This commit is contained in:
parent
87b5df9248
commit
57604e0be7
|
@ -9,6 +9,7 @@
|
|||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="chocolates"></div>
|
||||
<img src="./img/sweets.jpg" alt="a box of chocolate cupcakes">
|
||||
</div>
|
||||
<script src="./script/script.js" defer></script>
|
||||
|
|
|
@ -20,10 +20,25 @@ body {
|
|||
.container {
|
||||
height: 75vh;
|
||||
width: auto;
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.chocolates {
|
||||
height: 44vh;
|
||||
width: 18vw;
|
||||
top: 15vh;
|
||||
left: 6vw;
|
||||
padding-left: 1.25rem;
|
||||
padding-top: 1.25rem;
|
||||
padding-right: .5rem;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
img {
|
||||
max-height: 100%;
|
||||
width: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue