PDA

View Full Version : انتخاب فایل css بر اساس مرورگر بازدید کننده



Engineer_Yasin
چهارشنبه 16 آبان 1386, 03:29 صبح
دو فایل css دارم. می خواهم کدی در صفحه سایت بگذارم که اگر بیننده از اینترنت اکسپلورر 6 استفاده کرده فایل اول و اگر از اکسپلورر 7 استفاده کرده فایل دوم لود بشود. حال در پی آن کد هستم؟؟!!
ممنون می شوم کسی کمک کند!!:تشویق::تشویق:

rezamizbani
چهارشنبه 16 آبان 1386, 11:17 صبح
<!--[if IE]>
According to the conditional comment this is Internet Explorer<br />
<![endif]-->
<!--[if IE 5]>
According to the conditional comment this is Internet Explorer 5<br />
<![endif]-->
<!--[if IE 5.0]>
According to the conditional comment this is Internet Explorer 5.0<br />
<![endif]-->
<!--[if IE 5.5]>
According to the conditional comment this is Internet Explorer 5.5<br />
<![endif]-->
<!--[if IE 6]>
According to the conditional comment this is Internet Explorer 6<br />
<![endif]-->
<!--[if IE 7]>
According to the conditional comment this is Internet Explorer 7<br />
<![endif]-->
<!--[if gte IE 5]>
According to the conditional comment this is Internet Explorer 5 and up<br />
<![endif]-->
<!--[if lt IE 6]>
According to the conditional comment this is Internet Explorer lower than 6<br />
<![endif]-->
<!--[if lte IE 5.5]>
According to the conditional comment this is Internet Explorer lower or equal to 5.5<br />
<![endif]-->
<!--[if gt IE 6]>
According to the conditional comment this is Internet Explorer greater than 6<br />
<![endif]-->


هر پارامتری را که در بین این if ها بزاری در مرور گر های مختلف اجرا می شیه و کلمه gt به معنای نسخه بالا تر و lte به معنای نسخه پایین تر هست !:بوس:

Ali_ix
پنج شنبه 17 آبان 1386, 08:07 صبح
و کلا اسم این چیزی که گفتند Conditional Comments هست.