模态弹出层效果
代码语言:html
所属分类:弹出层
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> - Modal Animations</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <style> * { box-sizing: border-box; } html, body { min-height: 100%; height: 100%; background-image: url(http://theartmad.com/wp-content/uploads/Dark-Grey-Texture-Wallpaper-5.jpg); background-size: cover; background-position: top center; font-family: helvetica neue, helvetica, arial, sans-serif; font-weight: 200; } html.modal-active, body.modal-active { overflow: hidden; } #modal-container { position: fixed; display: table; height: 100%; width: 100%; top: 0; left: 0; transform: scale(0); z-index: 1; } #modal-container.one { transform: scaleY(0.01) scaleX(0); animation: unfoldIn 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; } #modal-container.one .modal-background .modal { transform: scale(0); animation: zoomIn 0.5s 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; } #modal-container.one.out { transform: scale(1); animation: unfoldOut 1s 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; } #modal-container.one.out .modal-background .modal { animation: zoomOut 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; } #modal-container.two { transform: scale(1); } #modal-container.two .modal-background { background: rgba(0, 0, 0, 0); animation: fadeIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; } #modal-container.two .modal-background .modal { opacity: 0; animation: scaleUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; } #modal-container.two + .content { animation: scaleBack 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; } #modal-container.two.out { animation: quickScaleDown 0s .5s linear forwards; } #modal-container.two.out .modal-background { animation: fadeOut 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; } #modal-container.two.out .modal-background .modal { animation: scaleDown 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; } #modal-container.two.out + .content { animation: scaleForward 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; } #modal-container.three { z-index: 0; transform: scale(1); } #modal-container.three .modal-background { background: rgba(0, 0, 0, 0.6); } #modal-container.three .modal-background .modal { animation: moveUp.........完整代码请登录后点击上方下载按钮下载查看
网友评论0