css3动画 mignon_一款带左边框的CSS3信息提示框

本文展示了如何使用CSS3创建一个带有不同颜色边框和图标信息提示框的mignon动画效果。通过定义不同的类如.error, .warning, .success,可以设置不同类型的提示框,同时利用伪元素和动画实现视觉吸引力。" 126481503,1164098,Linux服务器优化:支持50000长连接实践,"['服务器运维', '系统优化', '网络连接']
摘要由CSDN通过智能技术生成

CSS

语言:

CSSSCSS

确定

@charset "UTF-8";

.message {

background-color: white;

width: calc(100% - 3em);

max-width: 24em;

padding: 1em 1em 1em 1.5em;

border-left-width: 6px;

border-left-style: solid;

border-radius: 3px;

position: relative;

line-height: 1.5;

}

.message + .message {

margin-top: 2em;

}

.message:before {

color: white;

width: 1.5em;

height: 1.5em;

position: absolute;

top: 1em;

left: -3px;

border-radius: 50%;

-webkit-transform: translateX(-50%);

transform: translateX(-50%);

font-weight: bold;

line-height: 1.5;

text-align: center;

}

.message p {

margin: 0 0 1em;

}

.message p:last-child {

margin-bottom: 0;

}

.message--error {

border-left-color: firebrick;

}

.message--error:before {

background-color: firebrick;

content: "‼";

}

.message--warning {

border-left-color: darkorange;

}

.message--warning:before {

background-color: darkorange;

content: "!";

}

.message--success {

border-left-color: darkolivegreen;

}

.message--success:before {

background-color: darkolivegreen;

content: "✔";

}

html {

box-sizing: border-box;

}

*,

*:before,

*:after {

box-sizing: inherit;

}

html {

height: 100%;

}

body {

background-color: gray;

min-height: 100%;

display: -webkit-box;

display: -webkit-flex;

display: -ms-flexbox;

display: flex;

-webkit-box-align: center;

-webkit-align-items: center;

-ms-flex-align: center;

align-items: center;

-webkit-box-pack: center;

-webkit-justify-content: center;

-ms-flex-pack: center;

justify-content: center;

-webkit-box-orient: vertical;

-webkit-box-direction: normal;

-webkit-flex-direction: column;

-ms-flex-direction: column;

flex-direction: column;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值