html - CSS 多浏览器中的 Aqua 按钮

标签 html css

我正在尝试创建一个在多个浏览器中看起来都很棒的浅绿色主题按钮。我是 CSS 的新手,所以请善待。

我在网上找到了一个在 Chrome 中看起来不错的例子......但在 IE 中没有显示......

下面是 chrome 中的按钮...

enter image description here

HTML:

 <div class="button aqua">
                <div class="glare"></div>
                Button Label
            </div>

CSS:

.button{
  width: 120px;
  height: 24px;
  padding: 5px 16px 3px;
  -webkit-border-radius: 16px;
  -moz-border-radius: 16px;
  border: 2px solid #ccc;
  position: relative;

  /* Label */
  font-family: Lucida Sans, Helvetica, sans-serif;
  font-weight: 800;
  color: #fff;
  text-shadow: rgba(10, 10, 10, 0.5) 1px 2px 2px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  text-overflow: ellipsis; 
  overflow: hidden;
}

.aqua{
  background-color: rgba(60, 132, 198, 0.8);
  background-image: -webkit-gradient(linear, 0% 0%, 0% 90%, from(rgba(28, 91, 155, 0.8)), to(rgba(108, 191, 255, .9)));
  border-top-color: #8ba2c1;
  border-right-color: #5890bf;
  border-bottom-color: #4f93ca;
  border-left-color: #768fa5;   
  -webkit-box-shadow: rgba(66, 140, 240, 0.5) 0px 10px 16px;
  -moz-box-shadow: rgba(66, 140, 240, 0.5) 0px 10px 16px; /* FF 3.5+ */
}

.button .glare {
  position: absolute;
  top: 0;
  left: 5px;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  height: 1px;
  width: 142px;
  padding: 8px 0;
  background-color: rgba(255, 255, 255, 0.25);
  background-image: -webkit-gradient(linear, 0% 0%, 0% 95%, from(rgba(255, 255, 255, 0.7)), to(rgba(255, 255, 255, 0)));
}

最佳答案

您缺少 IE 浏览器的 css 属性。 添加以下内容。示例如下。

JSFIDDLE

border-radius:8px;
box-shadow: rgba(66, 140, 240, 0.5) 0px 10px 16px;

关于html - CSS 多浏览器中的 Aqua 按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29179039/

相关文章:

javascript - 根据覆盖背景区域的亮度更改文本颜色?

html - 使用 bootstrap 对齐元素

html - FireFox CSS 动画无法运行。

html - 调整大小时无序列表显示内联跳转到新行

javascript - Vue - 动画与使用 Click 的普通 javascript 实现的区别

html - CSS 帮助 : active button not changing style

html - 在相对父级之外获得绝对div

html - 在 div 中居中包含按钮的表单

HTML 文本区域样式

css - Twitter Bootstrap - 如何在同一行和多个屏幕尺寸上处理多个输入的水平表单?