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