zoukankan      html  css  js  c++  java
  • 在css使用PHP/ASP代码

    http://www.corange.cn/archives/2008/06/1242.html 这个是我在使用的例子,当然也许有一些不足,这里写出来给大家参考下 当然在ASP中也是可以用的 我的这个例子是动态改变背景色,因为前台是生成静态页的,才考虑到用这个方法 先将CSS文件命名为php文件 <link href="../css/corange.css.php" rel="stylesheet" type="text/css"> _fcksavedurl=""../css/corange.css.php" rel="stylesheet" type="text/css">" _fcksavedurl=""../css/corange.css.php" rel="stylesheet" type="text/css">" _fcksavedurl=""../css/corange.css.php" rel="stylesheet" type="text/css">" 然后在CSS.PHP文件中 BODY {         FONT-FAMILY: 宋体;          color:#464646;          font-size:12px;         margin-left: 0px;         margin-top: 0px;         margin-right: 0px;         margin-bottom: 0px;         background-color: #<?php         require('../Connections/cn.php');         $sql22 = "select id,bgcolor from config where id=1";         $result22 = mysql_query( $sql22 );         $res_now22 = mysql_fetch_array($result22);//不能用mysql_fetch_row         $bgcolor = $res_now22['bgcolor'];          echo $bgcolor?>;; } 注意这段PHP代码不能放在顶部
  • 相关阅读:
    JQuery实现数组移除指定元素
    美团酒旅面经
    搜狗一面
    360面经
    头条面经
    搜狐笔试题
    kolakoski序列
    函数的节流
    隐藏元素的几种方法
    移动端适配与响应式布局
  • 原文地址:https://www.cnblogs.com/zerogo/p/2209307.html
Copyright © 2011-2022 走看看