اجرای کد css درinternet explorer

mehdi0111

تازه وارد
با سلم خدمت دوستان!من برنامه نویس مبتدی هستم.یه کد toturial از سایت w3school.com گرفتم برای اینکه عکس پس زمینه هنگام اسکرول صفحه ثابت بماند،اما وقتی تو notepad تایپ ودر IE 8.0 باز میکنم اصلا عکس پس زمینه نمیاد.این کد هستش:

<!DOCTYPE html>

<html>

<head>

<style type="text/css">

body

{

background-image:url('smiley.gif');

background-repeat:no-repeat;

background-attachment:fixed;

}

</style>

</head>

<body>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

<p>The background-image is fixed. Try to scroll down the page.</p>

</body>

</html>


میخاستم ببینم اشکال از کد هست یا برای اجرای css به برنامه خاصی نیاز هست؟

 

mahdiali35

کاربر عضو
درود....کد سالمه...از وجود فایل smiley.gif در کنار سند html مطمئن بشید...

 

mehdi0111

تازه وارد
باتشکر از پاسختون . url عکس درسته من می گم شاید اول باید در دریم ویور سایت وسرور تعریف بشه ،البته من به صورت offline در IE باز میکنم.برای مقایسه حتی در اجرای این کد html در دریم عکس حرکت نکرد؟ :-/

<!DOCTYPE html>

<html>

<body>

<p>

<img src="smiley.gif" alt="Smiley face" align="left" width="32" height="32" />

A paragraph with an image. The align attribute of the image is set to "left". The image will float to the left of this text.

</p>

<p>

<img src="smiley.gif" alt="Smiley face" align="right" width="32" height="32" />

A paragraph with an image. The align attribute of the image is set to "right". The image will float to the right of this text.

</p>

</body>

</html>


 

mahdiali35

کاربر عضو
درود....خیر دوست عزیز ربطی به دریم ویور نداره چون از php و...استفاده نمیکنیم...شما مطمئنی فرمت فایل شما .html هست؟؟؟

در ضمن کد دومی حرکت عکس و...نیست فقط چینش عکس به صورت راست یا چپ هست...

نکته ی دیگه اینکه اصلا در مرورگرهای دیگه میاد که توی ie نمیاد؟؟؟؟...چون کد خیلی پیچیده ای نیست که ie مشکل داشته باشه توش...

شاد باشید...

 
بالا