我想为IE加载另一个CSS.我正在使用Symfony 1.2.什么是最快的方式?我宁愿不使用"view.yml"技术.我希望在我的脑子里有类似的东西:
<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen" />
<!--[if lte IE 7]>
<link rel="stylesheet" href="css/ie6.css" type="text/css" media="screen" />
<![endif]-->
Run Code Online (Sandbox Code Playgroud)
我目前在layout.php文件中有这个代码,用于包含样式表.
<?php include_http_metas() ?>
<?php include_metas() ?>
<?php use_stylesheet('style.css') ?>
Run Code Online (Sandbox Code Playgroud)
你们知道任何快速解决方案吗?
小智 6
Symfony支持条件CSS和JS,我没有看到不使用view.yml的原因 - 只需在view.yml中编写(例如apps/frontend/config/view.yml)
CSS:
stylesheets:
- ie6.css: { condition: IE 6 }
Run Code Online (Sandbox Code Playgroud)
JS:
javascripts:
- myiescript.js: { condition: IE 6 }
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1216 次 |
| 最近记录: |