LC Waikiki - Online Shopping for Fashion & Clothing
<!DOCTYPE html>
<html>
<head>
<title>LC Waikiki - Online Shopping for Fashion & Clothing</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #F2F2F2;
}
<p>.main-nav {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}</p>
<p>.main-nav li {
float: left;
}</p>
<p>.main-nav a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}</p>
<p>.main-nav a:hover {
background-color: #ddd;
color: black;
}</p>
<p>.hero {
background-image: url('https://cdn-images.lcwaikiki.com/img/banner/banner_bg_image.jpg');
background-size: cover;
width: 100%;
height: 500px;
}</p>
<p>.banner-text {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
}</p>
<p>.product-container {
margin: 0 auto;
max-width: 1200px;
padding: 0 10px;
}</p>
<p>.product-item {
float: left;
width: 25%;
padding: 10px;
}</p>
<p>.product-image {
width: 100%;
height: 350px;
background-position: center;
background-size: cover;
}</p>
<p>.product-title {
font-size: 1.2em;
font-weight: bold;
margin: 5px 0;
}</p>
<p>.product-price {
font-size: 1.5em;
font-weight: bold;
margin: 5px 0;
color: #ff0000;
}</p>
<p>.clearfix:after {
content: "";
display: table;
clear: both;
}</p>
<p>.footer {
background-color: #333333;
color: white;
padding: 10px;
position: absolute;
bottom: 0;
width: 100%;
}</p>
</style>
<script>
function showPopup(imageUrl) {
var popup = document.getElementById("popup");
popup.style.display = "block";
<pre><code>var popupImage = document.getElementById("popup-image");
popupImage.src = imageUrl;
</code></pre>
<p>}</p>
<p>function closePopup() {
var popup = document.getElementById("popup");
popup.style.display = "none";
}
</script></p>
</head>
<body>
<ul class='main-nav'>
<li><a href='#'>Home</a></li>
<li><a href='#'>Products</a></li>
<li><a href='#'>About</a></li>
<li><a href='#'>Contact</a></li>
</ul>
<pre><code><div class='hero'>
<div class='banner-text'>
<h1>Welcome To LC Waikiki</h1>
<p>The Best Place For Shopping</p>
</div>
</div>
<div class='product-container clearfix'>
<div class='product-item'>
<div class='product-image' style='background-image:url(https://cdn-images.lcwaikiki.com/img/h/202006/20200625_shirt_man_red_01_front.jpg);' onclick='showPopup('https://cdn-images.lcwaikiki.com/img/h/202006/20200625_shirt_man_red_01_front.jpg')'></div>
<div class='product-title'>Red Shirt</div>
<div class='product-price'>$25</div>
</div>
<div class='product-item'>
<div class='product-image' style='background-image:url(https://cdn-images.lcwaikiki.com/img/h/202006/20200625_shirt_man_white_01_front.jpg);' onclick='showPopup('https://cdn-images.lcwaikiki.com/img/h/202006/20200625_shirt_man_white_01_front.jpg')'></div>
<div class='product-title'>White Shirt</div>
<div class='product-price'>$20</div>
</div>
<div class='product-item'>
<div class='product-image' style='background-image:url(https://cdn-images.lcwaikiki.com/img/h/202006/20200625_pants_woman_black_01_front.jpg);' onclick='showPopup('https://cdn-images.lcwaikiki.com/img/h/202006/20200625_pants_woman_black_01_front.jpg')'></div>
<div class='product-title'>Black Pants</div>
<div class='product-price'>$30</div>
</div>
<div class='product-item'>
<div class='product-image' style='background-image:url(https://cdn-images.lcwaikiki.com/img/h/202006/20200625_tshirt_woman_blue_01_front.jpg);' onclick='showPopup('https://cdn-images.lcwaikiki.com/img/h/202006/20200625_tshirt_woman_blue_01_front.jpg')'></div>
<div class='product-title'>Blue T-Shirt</div>
<div class='product-price'>$35</div>
</div>
</div>
<div id='popup' style='display:none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8);'>
<div style='position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);'>
<img id='popup-image' style='max-width: 90%; border-radius: 5px;' />
<a href='#' onclick='closePopup()' style='display: block; text-align: center; margin-top: 10px; color: white; text-decoration: none;'>Close</a>
</div>
</div>
<div class='footer'>
<p>Copyright &copy; 2020 LC Waikiki. All rights reserved.</p>
</div>
</code></pre>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/lf3b 著作权归作者所有。请勿转载和采集!