掲示板
Use of VM Variables in CSS Files
11年前 に MANOVINAYAK AYYAPPAN によって更新されました。
Use of VM Variables in CSS Files
Regular Member 投稿: 131 参加年月日: 11/06/13 最新の投稿
Hi All,
I would like to reference VM variables inside CSS files.
I tried the following:
I tried to load an Image referenced in one of my CSS files using the VM variable $images_folder as shown below:
But the Image failed to Load.
Please let me know whether there is any other way to use VM variables apart from using the relative or absolute path.
I saw in Liferay source code that images are referenced in CSS file only using relative path:
portlet.css
I would like to reference VM variables inside CSS files.
I tried the following:
I tried to load an Image referenced in one of my CSS files using the VM variable $images_folder as shown below:
#demo-Background{
background-color: #0B2D53;
/* background-image:url('../images/bg.jpg'); */
background-image:url($images_folder/bg.jpg);
height: 100%;
}
But the Image failed to Load.
Please let me know whether there is any other way to use VM variables apart from using the relative or absolute path.
I saw in Liferay source code that images are referenced in CSS file only using relative path:
portlet.css
.portlet-icon-back {
background: url(../images/arrows/01_left.png) no-repeat 0 50%;
font-weight: bold;
padding: 5px 5px 5px 18px;
}