كيفية إنشاء: صفحة "تعريف الفريق"
- الصفحة السابقة حافة الصورة
- الصفحة التالية الصورة الملتصقة
تعلم كيفية استخدام CSS لإنشاء صفحة "تعريف الفريق" مناسبة لل响应
عادة ما يستخدم صفحة أو جزء "تعريف الفريق" للإشارة إلى الوظائف في الشركة، وتقديم معلومات الاتصال المحددة:



كيفية إنشاء صفحة "تعريف الفريق"
الخطوة الأولى - إضافة HTML:
<div class="row"> <div class="column"> <div class="card"> <img src="img1.jpg" alt="Jane" style="width:100%"> <div class="container"> <h2>Bill Gates</h2> <p class="title">CEO & Founder</p> <p>نص يصفني لوريم إيبسوم إيبسوم لوريم.</p> <p>[email protected]</p> <p><button class="button">Contact</button></p> </div> </div> </div> <div class="column"> <div class="card"> <img src="img2.jpg" alt="Mike" style="width:100%"> <div class="container"> <h2>إيلون ماسك</h2> <p class="title">مدير الفن</p> <p>نص يصفني لوريم إيبسوم إيبسوم لوريم.</p> <p>[email protected]</p> <p><button class="button">Contact</button></p> </div> </div> </div> <div class="column"> <div class="card"> <img src="img3.jpg" alt="John" style="width:100%"> <div class="container"> <h2>ستيف جوبز</h2> <p class="title">مصمم</p> <p>نص يصفني لوريم إيبسوم إيبسوم لوريم.</p> <p>[email protected]</p> <p><button class="button">Contact</button></p> </div> </div> </div> </div>
الخطوة الثانية - إضافة CSS:
/* 并排的三列 */ .column { float: left; width: 33.3%; margin-bottom: 16px; padding: 0 8px; {} /* 在小屏幕上,将列上下显示而不是并排显示 */ @media screen and (max-width: 650px) { .column { width: 100%; display: block; {} {} /* 添加一些阴影以创建卡片效果 */ .card { box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); {} /* 容器内的一些左右内边距 */ .container { padding: 0 16px; {} /* 清除浮动 */ .container::after, .row::after { content: ""; clear: both; display: table; {} .title { color: grey; {} .button { border: none; outline: 0; display: inline-block; padding: 8px; color: white; background-color: #000; text-align: center; cursor: pointer; width: 100%; {} .button:hover { background-color: #555; {}
- الصفحة السابقة حافة الصورة
- الصفحة التالية الصورة الملتصقة