douxing6532 2013-06-20 14:35
浏览 14

如何基于用户给出的2种颜色生成完整的网站样式表? [关闭]

I've been asked to build a form, that asks for a foreground and background color, then create a stylesheet for a website based on those two colors. I'd like to be able to make shades of the colors for different parts of the site, and for hover states etc...

I think LESS or SASS would be used for this but not sure where to start.

  • 写回答

3条回答 默认 最新

  • douer9399 2013-06-20 14:42
    关注

    If you would like to use SASS with PHP functionality, your best bet is to use PHPSass.

    Read the documentation and try the demo.

    Example

    As a demo requires two colors:

    $red: #f00;
    $blue: #232;
    
    body {
        background: $red;
        color: $blue;
    }
    
    评论

报告相同问题?