جایگیری تصویر پس زمینه در محوطه محتوا
بازگشت به صفحه اصلی
بازگشت به صفحه مقاله
دو ستونی
دو سطری
اجرای کد RUN »
<!DOCTYPE html> <html> <head> <style> .div1 { border: 1px solid black; height:150px; width:180px; background:url(http://cp.webmehraz.com//Files/Tutorial/10225/img_flwr.gif); background-repeat: no-repeat; } .div2 { border: 1px solid black; height:150px; width:180px; background:url(http://cp.webmehraz.com//Files/Tutorial/10225/img_flwr.gif); background-repeat: no-repeat; background-size: contain; } .div3 { border: 1px solid black; height:150px; width:180px; background:url(http://cp.webmehraz.com//Files/Tutorial/10225/img_flwr.gif); background-repeat: no-repeat; background-size: cover; } </style> </head> <body dir="rtl"> <p>تصویر اصلی :</p> <div class="div1"> <p>این یک متن ساختگی است.</p> </div> <p>استفاده از مقدار "contain" :</p> <div class="div2"> <p>این یک متن ساختگی است.</p> </div> <p>استفاده از مقدار "cover" :</p> <div class="div3"> <p>این یک متن ساختگی است.</p> </div> </body> </html>