ads
mardi 24 décembre 2024
/* General styles for the promo container */
.promo-container {
background-color: #F0F0F0; /* Light gray background */
border-radius: 10px; /* Rounded corners */
padding: 20px;
text-align: center;
margin: 20px auto; /* Center horizontally */
max-width: 300px; /* Limit width for better responsiveness */
}
/* Styles for the iHerb logo */
.promo-logo {
color: #333; /* Dark gray logo color */
font-size: 24px;
font-weight: bold;
}
/* Styles for the promo code */
.promo-code {
color: #009688; /* Green promo code color */
font-size: 20px;
margin-top: 10px;
}
/* Styles for the copy button */
.copy-button {
background-color: #009688; /* Green button color */
color: #fff; /* White text */
border: none;
border-radius: 5px;
padding: 10px 20px;
margin-top: 15px;
cursor: pointer;
}
/* Styles for the discount text */
.discount-text {
color: #333; /* Dark gray text color */
font-size: 16px;
margin-top: 10px;
}
/* General styles for the promo container */
.promo-container {
background-color: #F0F0F0; /* Light gray background */
border-radius: 10px; /* Rounded corners */
padding: 20px;
text-align: center;
margin: 20px auto; /* Center horizontally */
max-width: 300px; /* Limit width for better responsiveness */
}
/* Styles for the iHerb logo */
.promo-logo {
color: #333; /* Dark gray logo color */
font-size: 24px;
font-weight: bold;
}
/* Styles for the promo code */
.promo-code {
color: #009688; /* Green promo code color */
font-size: 20px;
margin-top: 10px;
}
/* Styles for the copy button */
.copy-button {
background-color: #009688; /* Green button color */
color: #fff; /* White text */
border: none;
border-radius: 5px;
padding: 10px 20px;
margin-top: 15px;
cursor: pointer;
}
/* Styles for the discount text */
.discount-text {
color: #333; /* Dark gray text color */
font-size: 16px;
margin-top: 10px;
}
dimanche 22 décembre 2024
لإنشاء صفحة ويب وفقًا للمواصفات التي ذكرتها، إليك نموذجًا بسيطًا لـ HTML وCSS يمكن استخدامه لتصميم الصفحة:
HTML:
منتجات العناية بالبشرة والمكملات الغذائية
CSS:
body {
font-family: Arial, sans-serif;
background-color: #4CAF50; /* اللون الأخضر */
color: white;
margin: 0;
padding: 0;
text-align: center;
}
.container {
padding: 20px;
}
header h1 {
font-size: 2.5em;
margin-bottom: 20px;
}
.products {
display: flex;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
}
.product-item {
background-color: white;
color: black;
padding: 10px;
border-radius: 8px;
width: 200px;
text-align: center;
}
.product-item img {
width: 100%;
border-radius: 8px;
}
.discount-box {
background-color: #fff;
color: black;
padding: 20px;
margin-top: 30px;
border-radius: 8px;
}
#copyCode {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
#copyCode:hover {
background-color: #45a049;
}
شرح التصميم:
1. اللون الأخضر: تم استخدام اللون الأخضر كلون خلفية للصفحة.
2. المنتجات: يتم عرض المنتجات في شكل مربعات تحتوي على صور المنتجات مع تسميات أسفلها.
3. مربع كود الخصم: في منتصف الصفحة، يوجد مربع يحتوي على كود خصم يمكنك نسخه.
4. زر نسخ كود الخصم: يتم استخدام JavaScript لنسخ الكود إلى الحافظة عند الضغط على الزر.
يمكنك تخصيص هذا التصميم وتغيير المحتوى مثل الصور أو أسماء المنتجات بما يتناسب مع منتجك الفعلي.
منتجات العناية بالبشرة والمكملات الغذائية
منتج العناية بالبشرة 1
منتج العناية بالبشرة 2
مكمل غذائي 1
مكمل غذائي 2
كود الخصم: DISCOUNT2024
vendredi 20 décembre 2024
إليك مثال بسيط لصفحة ويب باستخدام HTML وCSS وJavaScript لإنشاء مربع كود الخصم:
HTML
```
كود الخصم
```
CSS (في ملف style.css)
```
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
}
.container {
width: 300px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border: 1px solid #ddd;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
input[type="text"] {
width: 100%;
كود الخصم
height: 40px;
margin-bottom: 10px;
padding: 10px;
border: 1px solid #ccc;
}
button {
width: 100%;
height: 40px;
background-color: #4CAF50;
color: #fff;
border: none;
cursor: pointer;
}
button:hover {
background-color: #3e8e41;
}
```
JavaScript (في ملف script.js)
```
function copyCode() {
var code = document.getElementById("code");
code.select();
navigator.clipboard.writeText(code.value);
alert("تم نسخ الكود!");
}
```
كيفية استخدامها
1. أنشئ ملفات HTML وCSS وJavaScript.
2. نسخ ولصق الشفرة في الملفات.
3. استبدل "YOUR_DISCOUNT_CODE" بكود الخصم الخاص بك.
4. افتح الملف HTML في متصفحك.
5. انسخ الكود وشاركه!
هل تحتاج إلى مزيد من المساعدة؟
كود الخصم
كود الخصم
mardi 26 novembre 2024
Code iherb
.coupon-container .close { width: 24px; position: absolute; top: 16px; right: 16px; z-index: 2; cursor: pointer; } .coupon-container { position: relative; font-family: "Roboto", sans-serif; max-width: 350px; text-align: center; background: #a3f9ff; margin: 100px auto 30px auto; opacity: 0; pointer-events: none; transform: translateY(30px); transition: all 400ms ease; } .coupon-container.active { opacity: 1; pointer-events: auto; transform: translateY(0); } .coupon-container .gift { position: absolute; width: 180px; top: -120px; left: 50%; transform: translateX(-50%); } .coupon-container .bg { position: absolute; left: 0; top: 0; width: 100%; } .coupon-container h2, .coupon-container p, .coupon-container .discount, .coupon-container .code, .coupon-container .btn { position: relative; } .coupon-container h2 { color: #023047; font-weight: 900; font-size: 30px; padding-top: 70px; margin-bottom: 0; } .coupon-container p { font-size: 18px; color: #023047; margin: 8px; } .coupon-container .discount { font-family: "Poppins", sans-serif; font-size: 56px; font-weight: 300; color: #076170; } .coupon-container .code { font-size: 45px; font-weight: 900; } .coupon-container .btn { text-decoration: none; background: #e63946; padding: 16px; display: inline-block; width: 100%; color: #fff; box-sizing: border-box; margin-top: 24px; font-size: 24px; font-weight: 900; text-transform: uppercase; transition: all 300ms ease; } .coupon-container .btn:hover { background: #e22535; } .get-discount-btn { padding: 8px 32px; background: #023047; color: #fff; border: none; font-size: 18px; cursor: pointer;
Inscription à :
Articles (Atom)