سلام
درخواست کد گوشه ای در سایت رزبلاگ
کدی که در گوشه سایت شناور باشه .... هنگامی که کلیک میکنید 2 گزینه بیاد .... واتس اپ .. تماس تلفنی داشته باشه
سلام
درخواست کد گوشه ای در سایت رزبلاگ
کدی که در گوشه سایت شناور باشه .... هنگامی که کلیک میکنید 2 گزینه بیاد .... واتس اپ .. تماس تلفنی داشته باشه
دادم هوش مصنوعی اینو داد
اینجا اجراش کن
https://www.rzb.ir/live_html_runner
<div class="floating-container">
<div class="options-wrapper" id="optionsWrapper">
<a href="https://wa.me/989123456789" target="_blank" class="option-btn whatsapp">
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="currentColor"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.145.298.092.525.148.706.186.297.074.567.063.782-.025.24-.098.767-.398.875-.786.108-.388.108-.72.076-.788-.032-.067-.118-.107-.415-.256zM12 2C6.477 2 2 6.477 2 12c0 1.89.513 3.665 1.408 5.202L2.317 21.68a.75.75 0 0 0 .943.943l4.478-1.09A9.958 9.958 0 0 0 12 22c5.523 0 10-4.477 10-10S17.523 2 12 2z"/></svg>
</a>
<a href="tel:+989123456789" class="option-btn phone">
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="currentColor"><path d="M6.62 10.79a15.053 15.053 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.02-.24 11.36 11.36 0 0 0 3.57.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1.02l-2.2 2.2z"/></svg>
</a>
</div>
<button class="main-btn" id="mainBtn">
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="#ffffff" viewBox="0 0 16 16">
<path d="M8 3a5 5 0 0 0-5 5v1h1a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V8a6 6 0 1 1 12 0v5a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h1V8a5 5 0 0 0-5-5z"></path>
</svg>
</button>
</div>
<style>
.floating-container {
position: fixed;
bottom: 30px;
right: 30px;
z-index: 999;
display: flex;
flex-direction: column;
align-items: center;
gap: 14px;
}
.main-btn {
width: 68px;
height: 68px;
background: #1a73e8;
border: none;
border-radius: 50%;
box-shadow: 0 4px 16px rgba(26, 115, 232, 0.4);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
color: #fff;
font-size: 30px;
position: relative;
}
.main-btn:hover {
transform: scale(1.05);
background: #1557b0;
box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5);
}
.main-btn:active {
transform: scale(0.92);
}
.options-wrapper {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
opacity: 0;
pointer-events: none;
transform: translateY(10px) scale(0.85);
transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
transform-origin: bottom center;
}
.options-wrapper.open {
opacity: 1;
pointer-events: auto;
transform: translateY(0) scale(1);
}
.option-btn {
width: 56px;
height: 56px;
border: none;
border-radius: 50%;
background: #ffffff;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 28px;
transition: all 0.2s ease;
text-decoration: none;
color: #222;
}
.option-btn:hover {
transform: scale(1.1);
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.option-btn.whatsapp {
background: #25d366;
color: #fff;
}
.option-btn.phone {
background: #34b7f1;
color: #fff;
}
.option-btn.whatsapp:hover {
background: #1da85c;
}
.option-btn.phone:hover {
background: #2a9fd6;
}
</style>
<script>
document.getElementById('mainBtn').addEventListener('click', function() {
document.getElementById('optionsWrapper').classList.toggle('open');
});
document.querySelectorAll('.option-btn').forEach(btn => {
btn.addEventListener('click', function(e) {
e.stopPropagation();
document.getElementById('optionsWrapper').classList.remove('open');
});
});
document.addEventListener('click', function(e) {
const container = document.querySelector('.floating-container');
if (!container.contains(e.target)) {
document.getElementById('optionsWrapper').classList.remove('open');
}
});
</script>copyدادم هوش مصنوعی اینو داد
اینجا اجراش کن
https://www.rzb.ir/live_html_runner
<div class="floating-container"> <div class="options-wrapper" id="optionsWrapper"> <a href="https://wa.me/989123456789" target="_blank" class="option-btn whatsapp"> <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="currentColor"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.145.298.092.525.148.706.186.297.074.567.063.782-.025.24-.098.767-.398.875-.786.108-.388.108-.72.076-.788-.032-.067-.118-.107-.415-.256zM12 2C6.477 2 2 6.477 2 12c0 1.89.513 3.665 1.408 5.202L2.317 21.68a.75.75 0 0 0 .943.943l4.478-1.09A9.958 9.958 0 0 0 12 22c5.523 0 10-4.477 10-10S17.523 2 12 2z"/></svg> </a> <a href="tel:+989123456789" class="option-btn phone"> <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="currentColor"><path d="M6.62 10.79a15.053 15.053 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.02-.24 11.36 11.36 0 0 0 3.57.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1.02l-2.2 2.2z"/></svg> </a> </div> <button class="main-btn" id="mainBtn"> <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="#ffffff" viewBox="0 0 16 16"> <path d="M8 3a5 5 0 0 0-5 5v1h1a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V8a6 6 0 1 1 12 0v5a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h1V8a5 5 0 0 0-5-5z"></path> </svg> </button> </div> <style> .floating-container { position: fixed; bottom: 30px; right: 30px; z-index: 999; display: flex; flex-direction: column; align-items: center; gap: 14px; } .main-btn { width: 68px; height: 68px; background: #1a73e8; border: none; border-radius: 50%; box-shadow: 0 4px 16px rgba(26, 115, 232, 0.4); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; color: #fff; font-size: 30px; position: relative; } .main-btn:hover { transform: scale(1.05); background: #1557b0; box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5); } .main-btn:active { transform: scale(0.92); } .options-wrapper { display: flex; flex-direction: column; align-items: center; gap: 12px; opacity: 0; pointer-events: none; transform: translateY(10px) scale(0.85); transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); transform-origin: bottom center; } .options-wrapper.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); } .option-btn { width: 56px; height: 56px; border: none; border-radius: 50%; background: #ffffff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 28px; transition: all 0.2s ease; text-decoration: none; color: #222; } .option-btn:hover { transform: scale(1.1); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); } .option-btn.whatsapp { background: #25d366; color: #fff; } .option-btn.phone { background: #34b7f1; color: #fff; } .option-btn.whatsapp:hover { background: #1da85c; } .option-btn.phone:hover { background: #2a9fd6; } </style> <script> document.getElementById('mainBtn').addEventListener('click', function() { document.getElementById('optionsWrapper').classList.toggle('open'); }); document.querySelectorAll('.option-btn').forEach(btn => { btn.addEventListener('click', function(e) { e.stopPropagation(); document.getElementById('optionsWrapper').classList.remove('open'); }); }); document.addEventListener('click', function(e) { const container = document.querySelector('.floating-container'); if (!container.contains(e.target)) { document.getElementById('optionsWrapper').classList.remove('open'); } }); </script>copy
ممنون