css实现一个地图折叠展开动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现一个地图折叠展开动画效果代码

代码标签: 地图 折叠 展开 动画 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

  
  
  
  
<style>
:root {
	--shadow-color: 0, 0, 0 ;
	--border-map: 1px dashed #6a5542 ;
	--shadow-bg: #130903;
	--map-img-url: url(//repo.bfw.wiki/bfwrepo/image/6032e655ee722.png);

}
	
body {
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	background: url(//repo.bfw.wiki/bfwrepo/image/6032e554eeb71.png);
}

.map-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    width: 100vw;
    height: 100vh;
}

.map-container:before {
    content: "";
    position: absolute;
    top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: radial-gradient(transparent 0%,  transparent 65%, #000000 100%); 
}

.map {
    background: #e3d198;
	z-index: 13;
    transition: all 0.5s ease 0s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    width: 16vw;
    height: 30vh;
	cursor: pointer;	
    transform-origin: 0% 0%;
	perspective-origin: center; 
    perspective: 800px ;
	border-radius: 5px;
	transform-origin: center;
    image-rendering: pixelated;
}

.map a {
	width: 16vw;
	height: 30vh;
}

.map div {
    position: absolute;	
	backface-visibility: hidden;
    width: 16vw;
    height: 30vh;
	perspective-origin: center center;
    perspective: 100vw;
	background-color: #e3d198;
}


.front-mid {
    background: var(--map-img-url) no-repeat center calc(50%  - 1px);
	z-index: 12;
	box-shadow: 0px 10px 10px -5px var(.........完整代码请登录后点击上方下载按钮下载查看

网友评论0