الصفحة الرئيسية
تحميل الكود
تغيير الألوان
تغيير العرض
تغيير حجم العرض
تشغيل الكود
<!DOCTYPE html> <html> <head> <style> .card { border-radius: 8px; max-width: 200px; box-shadow: 2px 2px 5px darkgray; text-align: center; } .user-icon { display: block; height: 100px; background-image: url('/tutorials/css/icons/user.png'); background-repeat: no-repeat; background-position: center; background-size: contain; } </style> </head> <body> <h1>Icon image</h1> <p>We set the following icon using background-image property.</p> <div class="card"> <span class="user-icon"></span> </div> </body> </html>