【问题标题】:-webkit-linear-gradient Not working in Dreamweaver CS6-webkit-linear-gradient 在 Dreamweaver CS6 中不工作
【发布时间】:2012-06-26 04:44:26
【问题描述】:

我多次尝试在 CSS 文档中应用以下代码:

display: block;
width: 500px;
margin: 500px auto;
padding: 15px;
text-align: center;
border: 4px solid blue;
background: -webkit-linear-gradient(top,black,white);
outline: 7px solid red;

一切都正确显示,除了渐变。我打开了 CS6 Live View,但它仍然拒绝出现。我在盒子里得到的只是白色背景,而不是黑白渐变。但是,当我在下载的 Coda 2 试用版中键入同一行代码时,它运行良好。有什么办法可以解决这个问题吗?

【问题讨论】:

  • Internet Explorer 怎么样?
  • 我没有在IE上测试过。我只使用 DW 的 Live View 功能。其他一切都很好,除了渐变。
  • 你为什么用DW的live view?请记住,它不是真正的浏览器。我建议您研究 LiveReload 和 Adob​​e Shadow 以帮助您正常工作。一旦你意识到它们有多棒,试试 sublime text 2...
  • 尝试colorzilla.com/gradient-editor 以获得跨浏览器渐变。
  • 谢谢大家。我想我会转向 Coda 2。到目前为止,我对试验印象非常深刻。

标签: html webkit adobe dreamweaver


【解决方案1】:

试试这个:

background-image: linear-gradient(top, rgb(0,0,0) 0%, rgb(255,255,255) 100%);
background-image: -o-linear-gradient(top, rgb(0,0,0) 0%, rgb(255,255,255) 100%);
background-image: -moz-linear-gradient(top, rgb(0,0,0) 0%, rgb(255,255,255) 100%);
background-image: -webkit-linear-gradient(top, rgb(0,0,0) 0%, rgb(255,255,255) 100%);
background-image: -ms-linear-gradient(top, rgb(0,0,0) 0%, rgb(255,255,255) 100%);

background-image: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0, rgb(0,0,0)),
    color-stop(1, rgb(255,255,255))
);

来自:http://gradients.glrzad.com/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-08
    • 1970-01-01
    • 1970-01-01
    • 2023-03-16
    • 1970-01-01
    • 1970-01-01
    • 2011-11-06
    • 1970-01-01
    相关资源
    最近更新 更多