CSS里面讯用数据库的方法

WBOY
Release: 2016-06-23 09:15:10
Original
1030 people have browsed it

#home .screen{
   background: url(../images/home_frei.png) no-repeat center 417px;
}

上面的是在CSS文件里面,
如何通过PHP程序调用,把../images/home_frei.png背景图片换了,

有那些方法。

因为CSS好像不能直接加PHP语句


回复讨论(解决方案)

你的css文件写成php文件。
css.php
#home .screen{
   background: url() no-repeat center 417px;
}

使用时

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template