我通过application.css包括使用资产管道的css文件,我的引导css文件要求我添加media="screen, projection"属性。
目前,我补充如下:
*= require /webjars/bootstrap/3.3.5/css/bootstrap-theme
*= require /webjars/bootstrap/3.3.5/css/bootstrap
*= require /webjars/bootstrap-tagsinput/0.5/bootstrap-tagsinput我的application.css,它正在产生:
<link rel="stylesheet" href="/assets/webjars/bootstrap/3.3.5/css/bootstrap-theme.css?compile=false">
<link rel="stylesheet" href="/assets/webjars/bootstrap/3.3.5/css/bootstrap.css?compile=false">
<link rel="stylesheet" href="/assets/bootstrap-multi-level-dropdown.css?compile=false">例如,我如何生成以下html?
<link rel="stylesheet" href="/assets/webjars/bootstrap/3.3.5/css/bootstrap-theme.css?compile=false" media="screen, projection">发布于 2015-09-08 12:11:43
您可以将media属性作为附加参数传递给标记。
除以下描述的属性外,任何其他属性都将被转发给由此标记生成的元素。
来源
例如,
<asset:stylesheet src="application.css" media="screen, projection"/>
https://stackoverflow.com/questions/32455706
复制相似问题