小编One*_*eft的帖子

多色边框重复可能与CSS?

我搜索过,只能找到多个边界问题.我需要制作一个有4种颜色重复的边框.

<div id="wrapper" style="width:100%; background:#ccc; border-top: thick solid blue; border-bottom: thick solid blue; padding:10px;">
<div id="content">
This is some content.
</div>
</div>
Run Code Online (Sandbox Code Playgroud)

http://jsfiddle.net/f7JT7/

我做了一切内联,所以更容易理解

我希望边框顶部和底部重复4种不同的颜色.

1 2 3 4 1 2 3 4 1 2 3 4

这可能与CSS?我知道我可以做点什么

<div>
<div id="red" style="width:50px;"></div><div id="green" style="margin-left:50px; width:50px;"></div><div id="purple" style="margin-left:100px; width:50px;"></div>
</div>
Run Code Online (Sandbox Code Playgroud)

但我想看看有没有更好的方法用css做到这一点?谢谢.

这是我正在寻找的边界

这是我设计的屏幕截图

html css border

5
推荐指数
2
解决办法
2万
查看次数

试图在PHP中显示基于url的标题

所以我正在整理一个简单的php页面,它会根据放入的url显示不同的内容.出于某种原因,它似乎通过整个if语句而没有做任何事情.

<?php
    if(array_key_exists('offer', $_GET)) {
        if( $_GET == "ncp" ){
            $title = 'Exclusive Offer from NCP';
        } elseif($_GET == "rt") {
            $title = 'Exclusive Offer from RT';
        } elseif($_GET == "oo") {
            $title = 'Exclusive Offer from OO';
        }
    } else {
        $title = 'Check Out These Exclusive Offers!';
    }
    $title = strip_tags($title);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?php echo $title; ?></title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script …
Run Code Online (Sandbox Code Playgroud)

php if-statement

0
推荐指数
1
解决办法
143
查看次数

标签 统计

border ×1

css ×1

html ×1

if-statement ×1

php ×1