html - 更改边框凹槽第二种颜色?

标签 html css

我正在使用边框凹槽,但我需要编辑第二种颜色。

border-right: 2px groove #FFFFFF;
border-top: 2px groove #FFFFFF;

最佳答案

您需要一些 CSS 技巧来制作类似 groove 的样式,请参见:http://jsfiddle.net/LbH92/9/

HTML:

<div class="border">
Hi I have two border colors<br />I am also Fluid
</div>

CSS:

div.border{
    border-right:2px solid #ffffff;
    border-top:2px solid #cccccc; 
    position:relative;
}
div.border:before{
    position:absolute; 
    display:block; 
    content:''; 
    border-right:2px solid #cccccc;
    border-top:2px solid #ffffff; 
    height:100%; 
    width:100%; 
    box-sizing: border-box; 
    -moz-box-sizing: 
    border-box; -webkit-box-sizing: 
    border-box;
    }

希望能解决问题!

关于html - 更改边框凹槽第二种颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20286672/

相关文章:

css - LaTeX 中有 css 的行高吗?

css - z-index 和链接的问题

javascript - header 比父元素宽 ~60%?

html - div 背景没有出现在 live ie 和 firefox 中

html - 3D Transform z-index 用 firefox 破坏,preserve-3d 不保留

css - 如何在不向元素添加 css 类的情况下设置页面内容的样式?

javascript - 预加载的图像再次加载

javascript - 为什么这个简单的正则表达式除了 html5 输入模式属性之外在任何地方都可以工作?

javascript - 在元素样式上设置 .cssText 时过渡不起作用?

css - 已编译、缩小和连接的 css 文件和 sass 文件之间的源映射