addEventListener test
This commit is contained in:
parent
2f35200625
commit
5b17bb0a01
12
index.html
12
index.html
@ -1,8 +1,5 @@
|
|||||||
<html>
|
<html>
|
||||||
<style>
|
<style>
|
||||||
.wishes {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image-block img {
|
.image-block img {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
@ -22,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.image-block .image:has(input:checked) img {
|
.image-block .image:has(img.viewed) img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 150px;
|
top: 150px;
|
||||||
left: 300px;
|
left: 300px;
|
||||||
@ -64,6 +61,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<input type="file" id="input" multiple>
|
||||||
|
|
||||||
<div class="image-block">
|
<div class="image-block">
|
||||||
|
|
||||||
@ -99,5 +97,11 @@
|
|||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
const images = document.querySelectorAll("div.image-block img");
|
||||||
|
images.addEventListener();
|
||||||
|
images.addEventListener('click', function(){img.classList.toggle('view')};);
|
||||||
|
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user