谷歌gmail通知程序css
发送邮件或放弃电子邮件时,顶部会出现一个黄色框,其中显示消息“您的邮件已被放弃。撤消放弃”。我想要完全相同的谷歌css样式。 欢迎提供任何示例和建议。多谢各位 请参考下面的图片和链接 使用以下css:谷歌gmail通知程序css,css,gmail,Css,Gmail,发送邮件或放弃电子邮件时,顶部会出现一个黄色框,其中显示消息“您的邮件已被放弃。撤消放弃”。我想要完全相同的谷歌css样式。 欢迎提供任何示例和建议。多谢各位 请参考下面的图片和链接 使用以下css: .verticalBox { margin: 0 0; position: relative; top: 8px; z-index: 990; border-color: #f0c36d; background-color: #f9edbe; padding: 0 10
.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消息
结果:
另一个例子(直接来自gmail css)
css:
html:
加载。。。
结果:
如果您想复制CSS样式,可以通过chrome中的开发人员控制台轻松检查它,并从中获取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);
}
<div class="notification-container">
<div class="notification-message">
<span>Loading... <a href="damn.com">Click to learn more</a></span>
</div>
</div>