【问题标题】:Google gmail notifier css谷歌 gmail 通知器 css
【发布时间】:2013-10-22 08:14:07
【问题描述】:

发送消息或丢弃电子邮件时,顶部会出现一个黄色框,其中显示“您的消息已被丢弃。撤消丢弃”。我想要完全相同的 Google CSS 样式。 欢迎任何示例和建议。谢谢

请参考下图及链接

Print screen

【问题讨论】:

  • 如果您想复制 CSS 样式,您可以通过 chrome 中的开发控制台轻松检查它并从那里获取 CSS。 (右键单击消息并检查元素)。它应该是
    ,至少对我来说。如果我理解正确的话。

标签: css gmail


【解决方案1】:

另一个例子(直接来自 gmail css)

http://jsfiddle.net/VVbZZ/1/

css:

.notification-container {
    left: 0;
    top: 0;
    margin: 0;
    font-family: arial, sans-serif;
    font-weight: bold;
    visibility: hidden;
    z-index: 8;
    position: absolute;
    text-align: center;
    width: 100%;
    height: 100%;
}
.notification-message {
    position: relative;
    display: inline-block;
    visibility: visible;
    font-size: 80%;
    padding: 6px 10px;
    background-color: #f9edbe;
    border: 1px solid #f0c36d;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

html:

<div class="notification-container">
    <div class="notification-message"> 
       <span>Loading... <a href="damn.com">Click to learn more</a></span>
    </div>
</div>

结果:

【讨论】:

    【解决方案2】:

    使用下面的css:

    .verticalBox {
      margin: 0 0;
      position: relative;
      top: 8px;
      z-index: 990;
      border-color: #f0c36d;
      background-color: #f9edbe;
      padding: 0 10px;
      border: 1px solid transparent;
      border-radius: 2px;
      -webkit-border-radius: 2px;
      -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.2);
      box-shadow: 0 2px 4px rgba(0,0,0,0.2);
      background: #f9edbe;
      border-color: #f9edbe;
      color: #222;
      padding: 0 7px;
      font-size: 80%;
      font-weight: bold; 
      text-align: center;
    }
    

    并使用以下 HTML:

    <div class="verticalBox">This is testing</div>
    

    这类似于 gmail 消息。

    结果:

    JSFiddle

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多