cover در ویژگی object-fit
بازگشت به صفحه اصلی
بازگشت به صفحه مقاله
دو ستونی
دو سطری
اجرای کد RUN »
<!DOCTYPE html> <html> <body> <h2>Using object-fit</h2> <p>Here we use "object-fit: cover;", so when we resize the browser window, the aspect ratio of the images is preserved:</p> <div style="width:100%;height:400px;"> <img src="http://cp.webmehraz.com//Files/rock600x400.jpg" alt="Norway" style="float:left;width:50%;height:100%;object-fit:cover;"> <img src="http://cp.webmehraz.com//Files/paris.jpg" alt="Paris" style="float:left;width:50%;height:100%;object-fit:cover;"> </div> </body> </html>