پرش به محتوا

باکس شناور - فراغیب

از فراغیب
صفحه‌ای تازه حاوی «<html lang="fa" dir="rtl"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>کادر معرفی</title> <meta name="description" content="استاد شایق، استاد مدرس خودشناسی"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family...» ایجاد کرد
 
بدون خلاصۀ ویرایش
 
(۲ نسخهٔ میانیِ ایجادشده توسط همین کاربر نشان داده نشد)
خط ۱: خط ۱:
<html lang="fa" dir="rtl">
<html lang="fa" dir="rtl">
<head>
<head>
<meta charset="UTF-8">
  <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>کادر معرفی</title>
 
<meta name="description" content="استاد شایق، استاد مدرس خودشناسی">
  <title>کادر معرفی</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
  <meta name="description" content="استاد شایق، استاد مدرس خودشناسی" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
 
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;700&display=swap" rel="stylesheet">
  <link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="stylesheet"
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
  <link
<style>
    href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;700&display=swap"
*{
    rel="stylesheet"
margin:0;
  />
padding:0;
 
box-sizing:border-box;
  <link
}
    rel="stylesheet"
body{
    href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css"
font-family:'Vazirmatn',sans-serif;
  />
background:#f5f5f5;
 
padding:20px;
  <style>
line-height:1.9;
    * {
color:#444;
      margin: 0;
}
      padding: 0;
/* =======================
      box-sizing: border-box;
  Notification Box
    }
======================= */
 
.info-box{
    body {
max-width:420px;
      font-family: "Vazirmatn", sans-serif;
width:100%;
      background: #f5f5f5;
background:#fff;
      padding: 20px;
border-radius:14px;
      line-height: 1.9;
box-shadow:
      color: #444;
0 4px 18px rgba(0,0,0,.08);
    }
padding:16px;
 
position:relative;
    /* محل قرارگیری کادر در دسکتاپ */
overflow:hidden;
    .online-support-box {
}
      position: fixed;
/* Close */
      left: 20px;
.info-box .close{
      bottom: 20px;
position:absolute;
      z-index: 999999;
top:12px;
    }
left:12px;
 
width:34px;
    /* کادر اصلی */
height:34px;
    .info-box {
border:none;
      max-width: 340px;
background:#f4f4f4;
      width: 100%;
border-radius:50%;
      background: #fff;
cursor:pointer;
      border-radius: 14px;
transition:.3s;
      box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
display:flex;
      padding: 14px;
align-items:center;
      position: relative;
justify-content:center;
      overflow: hidden;
color:#888;
      transition: opacity 0.3s ease, transform 0.3s ease;
font-size:16px;
    }
}
 
.info-box .close:hover{
    .info-box.hide {
background:#e8e8e8;
      opacity: 0;
transform:rotate(90deg);
      transform: translateY(15px);
}
      pointer-events: none;
/* Header */
    }
.info-header{
 
display:flex;
    /* دکمه ضربدر */
justify-content:flex-start;
    .close {
align-items:center;
      position: absolute;
gap:12px;
      top: 10px;
margin-bottom:14px;
      left: 10px;
}
      width: 30px;
/* Avatar */
      height: 30px;
.avatar{
      border: none;
width:62px;
      background: #f3f3f3;
height:62px;
      border-radius: 50%;
border-radius:50%;
      cursor: pointer;
background: #40826D;
      transition: 0.3s;
display:flex;
      display: flex;
align-items:center;
      align-items: center;
justify-content:center;
      justify-content: center;
font-size:34px;
      color: #777;
color:#fff;
      font-size: 14px;
flex-shrink:0;
    }
box-shadow:0 3px 10px rgba(0,0,0,.08);
 
}
    .close:hover {
/* Title */
      background: #e7e7e7;
.info-title{
      transform: rotate(90deg);
font-size:16px;
    }
font-weight:700;
 
color:#2c9b66;
    /* بخش عنوان */
}
    .info-header {
/* Text */
      display: flex;
.info-text{
      align-items: center;
font-size:15px;
      gap: 10px;
color:#666;
      margin-bottom: 10px;
}
      padding-left: 34px;
/* Desktop */
    }
@media(min-width:768px){
 
.info-box{
    /* آیکون داخل کادر */
padding:20px;
    .avatar {
}
      width: 52px;
.info-title{
      height: 52px;
font-size:16px;
      border-radius: 50%;
}
      background: linear-gradient(135deg, #2c9b66, #45b883);
.info-text{
      display: flex;
font-size:15px;
      align-items: center;
}
      justify-content: center;
}
      font-size: 24px;
</style>
      color: #fff;
      flex-shrink: 0;
      box-shadow: 0 3px 10px rgba(44, 155, 102, 0.25);
    }
 
    .info-title {
      font-size: 14px;
      font-weight: 700;
      color: #2c9b66;
      line-height: 1.8;
    }
 
    .info-text {
      font-size: 14px;
      color: #666;
    }
 
    /* آیکون شناور مخصوص موبایل */
    .mobile-toggle {
      display: none;
      width: 56px;
      height: 56px;
      border: none;
      border-radius: 50%;
      background: linear-gradient(135deg, #2c9b66, #45b883);
      color: #fff;
      font-size: 24px;
      cursor: pointer;
      box-shadow: 0 5px 16px rgba(44, 155, 102, 0.35);
      align-items: center;
      justify-content: center;
      transition: 0.3s;
    }
 
    .mobile-toggle:hover {
      transform: scale(1.08);
    }
 
    /* تنظیمات موبایل */
    @media (max-width: 600px) {
      .online-support-box {
        left: 14px;
        bottom: 14px;
      }
 
      .info-box {
        display: none;
        max-width: calc(100vw - 28px);
      }
 
      .info-box.mobile-open {
        display: block;
        animation: showBox 0.3s ease forwards;
      }
 
      .mobile-toggle {
        display: flex;
      }
 
      .mobile-toggle.hidden {
        display: none;
      }
    }
 
    @keyframes showBox {
      from {
        opacity: 0;
        transform: translateY(15px);
      }
 
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
  </style>
</head>
</head>
<body>
<body>
<section class="info-box" aria-label="معرفی استاد">
  <div class="online-support-box">
<button class="close" aria-label="بستن">
 
<i class="fa-solid fa-xmark"></i>
    <!-- آیکون مخصوص موبایل -->
</button>
    <button
<div class="info-header">
      class="mobile-toggle"
<div class="avatar">
      id="mobileToggle"
<i class="fa-solid fa-user"></i>
      aria-label="نمایش اطلاعات"
</div>
      title="نمایش اطلاعات"
<h2 class="info-title">
    >
استاد شایق، استاد مدرس خودشناسی
      <i class="fa-solid fa-headset"></i>
</h2>
    </button>
</div>
 
<p class="info-text">
    <!-- کادر معرفی -->
سپاس از بازدید شما.. اگر سوالی دارید... در خدمت شما هستیم...
    <section class="info-box" id="infoBox" aria-label="معرفی استاد">
</p>
      <button class="close" id="closeBtn" aria-label="بستن">
</section>
        <i class="fa-solid fa-xmark"></i>
      </button>
 
      <div class="info-header">
        <div class="avatar">
          <i class="fa-solid fa-headset"></i>
        </div>
 
        <h2 class="info-title">
          استاد شایق، استاد مدرس خودشناسی
        </h2>
      </div>
 
      <p class="info-text">
        سپاس از بازدید شما. اگر سوالی دارید، با افتخار در خدمت شما هستیم.
      </p>
    </section>
  </div>
 
  <script>
    const closeBtn = document.getElementById("closeBtn");
    const infoBox = document.getElementById("infoBox");
    const mobileToggle = document.getElementById("mobileToggle");
 
    // باز کردن کادر در موبایل
    mobileToggle.addEventListener("click", function () {
      infoBox.classList.add("mobile-open");
      mobileToggle.classList.add("hidden");
    });
 
    // بستن کادر
    closeBtn.addEventListener("click", function () {
      if (window.innerWidth <= 600) {
        infoBox.classList.remove("mobile-open");
        mobileToggle.classList.remove("hidden");
      } else {
        infoBox.classList.add("hide");
 
        setTimeout(function () {
          infoBox.style.display = "none";
        }, 300);
      }
    });
  </script>
</body>
</body>
</html>
</html>

نسخهٔ کنونی تا ‏۵ اوت ۲۰۲۶، ساعت ۱۲:۰۹

کادر معرفی

استاد شایق، استاد مدرس خودشناسی

سپاس از بازدید شما. اگر سوالی دارید، با افتخار در خدمت شما هستیم.