<!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: &quot;&quot;;
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(&quot;popup-image&quot;);
popupImage.src = imageUrl;
</code></pre>
<p>}</p>
<p>function closePopup() {
var popup = document.getElementById(&quot;popup&quot;);
popup.style.display = &quot;none&quot;;
}
</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>&lt;div class='hero'&gt;
    &lt;div class='banner-text'&gt;
        &lt;h1&gt;Welcome To LC Waikiki&lt;/h1&gt;
        &lt;p&gt;The Best Place For Shopping&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;div class='product-container clearfix'&gt;
    &lt;div class='product-item'&gt;
        &lt;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')'&gt;&lt;/div&gt;
        &lt;div class='product-title'&gt;Red Shirt&lt;/div&gt;
        &lt;div class='product-price'&gt;$25&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class='product-item'&gt;
        &lt;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')'&gt;&lt;/div&gt;
        &lt;div class='product-title'&gt;White Shirt&lt;/div&gt;
        &lt;div class='product-price'&gt;$20&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class='product-item'&gt;
        &lt;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')'&gt;&lt;/div&gt;
        &lt;div class='product-title'&gt;Black Pants&lt;/div&gt;
        &lt;div class='product-price'&gt;$30&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class='product-item'&gt;
        &lt;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')'&gt;&lt;/div&gt;
        &lt;div class='product-title'&gt;Blue T-Shirt&lt;/div&gt;
        &lt;div class='product-price'&gt;$35&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;div id='popup' style='display:none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8);'&gt;
    &lt;div style='position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);'&gt;
        &lt;img id='popup-image' style='max-width: 90%; border-radius: 5px;' /&gt;
        &lt;a href='#' onclick='closePopup()' style='display: block; text-align: center; margin-top: 10px; color: white; text-decoration: none;'&gt;Close&lt;/a&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;div class='footer'&gt;
    &lt;p&gt;Copyright &amp;copy; 2020 LC Waikiki. All rights reserved.&lt;/p&gt;
&lt;/div&gt;
</code></pre>
</body>
</html>
LC Waikiki - Online Shopping for Fashion & Clothing

原文地址: https://www.cveoy.top/t/topic/lf3b 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录