الصفحة الرئيسية
تحميل الكود
تغيير الألوان
تغيير العرض
تغيير حجم العرض
تشغيل الكود
<!DOCTYPE html> <html> <head> <style> #demo { width: max(50%, 300px); border: 1px solid black; background: bisque; padding: 10px; box-sizing: border-box; } </style> </head> <body> <h1>CSS max Function</h1> <div id="demo">The bigger value is used as width.</div> <p>If 300px is bigger than 50% where the element is shown, then 300px will be set as its width. But if 50% is bigger than 300px where the element is shown, then 50% will be set as its width.</p> <p>Note: Resize the screen to notice the change.</p> </body> </html>