css通知页面,CSS3页面右下角弹出式消息通知界面设计

CSS

语言:

CSSSCSS

确定

* {

box-sizing: border-box;

}

body {

font-family: Helvetica Neue;

}

.wrapper {

width: 75vw;

height: 50vw;

max-width: 100vw;

min-width: 400px;

max-height: 90vh;

min-height: 400px;

border-radius: 10px;

box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), inset 0 70px 0 -20px #DDD;

margin: auto;

position: relative;

background: #EEE;

overflow: hidden;

}

.toast-list {

position: fixed;

position: absolute;

bottom: 1em;

right: 0;

}

.toast {

min-width: 20em;

max-width: 30em;

margin-bottom: 1em;

display: flex;

animation: appear .5s 1s backwards;

}

.toast__image,

.toast-info {

box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25), 0 15px 30px rgba(0, 0, 0, 0.15);

}

.toast__image {

align-self: center;

width: 50px;

height: 50px;

flex-shrink: 0;

border-radius: 50%;

margin: .3em;

}

.toast-info {

display: flex;

flex-direction: column;

flex-grow: 1;

padding: .5em 1em;

position: relative;

overflow: hidden;

background: #1b5faa;

background: linear-gradient(#1b5faa, #18579a);

border-radius: 3px;

color: #FFF;

}

.toast-info.toast-info--error {

background: #D31;

}

.toast-info__title {

margin-bottom: .1em;

}

.toast-info__message {

font-size: .8em;

margin: .1em;

opacity: .75;

flex-grow: 1;

}

.toast-action {

text-align: center;

display: flex;

margin-top: 1em;

}

.toast-action__button {

flex-grow: 1;

padding: .5em 2em;

border-radius: 2px;

color: inherit;

cursor: pointer;

border: none;

background: rgba(255, 255, 255, 0.15);

margin: .2em;

}

.toast-action__button:hover {

background: rgba(255, 255, 255, 0.2);

}

.toast-action__button:active {

background: rgba(0, 0, 0, 0.15);

}

.toast-action__button--primary {

font-weight: bolder;

}

.toast-info__data {

font-size: .5em;

text-align: right;

opacity: .5;

}

.toast__dismiss {

align-self: center;

font-size: 1.5em;

margin: .25em;

}

.cancel-button {

cursor: default;

user-select: none;

opacity: .25;

}

.cancel-button:after {

content: '×';

}

.cancel-button:hover {

opacity: .75;

}

.toast-info__timer {

position: absolute;

bottom: 0;

left: 0;

right: 0;

height: 3px;

background: rgba(0, 0, 0, 0.4);

animation: timer 5s linear;

}

@keyframes timer {

from {

transform: scaleX(0);

}

to {

transform: scaleX(1);

}

}

@keyframes appear {

from {

opacity: 0;

transform: translateY(100%);

}

to {

opacity: 1;

transform: translateY(0);

}

}

@media screen and (max-width: 700px) {

.wrapper {

position: static;

background: none;

box-shadow: none;

}

}

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值