Hình nền
Bài học 17 trên 17 trong khóa học Accordion hình ảnh | Dự án front-end của Coddy.
Hình ảnh:
1.
https://images.hdqwalls.com/download/sunrise-landscape-minimalism-5k-ex-1920x1080.jpg2.
https://www.hdwallpapers.in/download/artistic_landscape_mountains_trees_sunset_purple_sky_background_minimalist_hd_minimalism-1280x720.jpg3.
https://rare-gallery.com/mocahbig/391766-mountain-minimalist-scenery-digital-art-4k-pc.jpg4.
https://images.hdqwalls.com/download/firewatch-forest-mountains-minimalism-4k-hb-2880x1800.jpgThử thách
DễNhư bạn có thể thấy ở trên, các hình ảnh được cung cấp là:
Tất cả những gì bạn cần làm là nhắm đến các id one, two, three, and four và đặt hình nền của chúng bằng URL ở trên.
Hoặc bạn có thể dùng:
https://picsum.photos/200/300cho mỗi hình ảnh.
Tự làm thử
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- Viết code HTML tại đây -->
<script src="script.js"></script>
</body>
</html>Tất cả bài học trong Accordion hình ảnh | Dự án front-end
Tự luyện tập: Playground Web