CSS - Example1

مثال تطبيقي شامل على دروس CSS


<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
  <meta charset="UTF-8">
  <title>تجربة CSS</title>
  <style>
    body {
      background-color: #f5f5f5;
      font-family: Tahoma, sans-serif;
      margin: 20px;
      color: #333;
    }

    h1 {
      text-align: center;
      color: #006699;
      text-transform: uppercase;
      border-bottom: 2px solid #ccc;
      padding-bottom: 10px;
    }

    .intro {
      background-color: #ffffff;
      padding: 15px;
      margin-bottom: 20px;
      border: 1px solid #ddd;
      border-radius: 8px;
    }

    .colored-box {
      background-color: rgb(255, 235, 205);
      border: 2px dashed #ff6600;
      padding: 10px;
      margin-bottom: 20px;
    }

    .custom-list {
      list-style-type: square;
      background-color: #e0f7fa;
      padding: 10px;
      max-width: 300px;
    }

    .custom-list li {
      padding: 5px 0;
    }

    table {
      border-collapse: collapse;
      width: 100%;
      max-width: 600px;
      margin: auto;
      background-color: #fff;
    }

    table, th, td {
      border: 1px solid #bbb;
    }

    th {
      background-color: #009688;
      color: white;
      padding: 10px;
    }

    td {
      padding: 8px;
      text-align: center;
    }

    a {
      color: #0077cc;
      text-decoration: none;
    }

    a:hover {
      text-decoration: underline;
    }

    .note {
      font-style: italic;
      color: #666;
      margin-top: 20px;
      text-align: center;
    }
  </style>
</head>
<body>

  <h1>تجربة تنسيقات CSS</h1>

  <div class="intro">
    <p>هذه فقرة توضيحية تحتوي على تنسيقات للنصوص، وتُظهر كيفية استخدام الحشوات والحدود والخطوط والخلفيات.</p>
  </div>

  <div class="colored-box">
    هذا صندوق بخلفية ملونة وحدود منقطة باستخدام RGB.
  </div>

  <ul class="custom-list">
    <li>العنصر الأول</li>
    <li>العنصر الثاني</li>
    <li>العنصر الثالث</li>
  </ul>

  <br>

  <table>
    <tr>
      <th>الاسم</th>
      <th>العمر</th>
    </tr>
    <tr>
      <td>أحمد</td>
      <td>25</td>
    </tr>
    <tr>
      <td>سارة</td>
      <td>30</td>
    </tr>
  </table>

  <p class="note">
    للمزيد، تفضل بزيارة
    <a href="https://www.example.com/css/">Example Website</a>
  </p>

</body>
</html>

تعليقات

المشاركات الشائعة من هذه المدونة

C# - Arrays

Entity Framework - ما هو ORM؟ ونبذة عن Dapper وNHibernate

1.1 SQL Introduction