条纹边框.html 1.47 KB
<html>
<head>
<style>
body, html {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  height: 100%;
}

body {
  background-repeat: no-repeat;
  background-position: center;
  background-image: radial-gradient(circle, #989898, #545454);
}

.container {
  width: 240px;
  margin: 20vh auto 0;
}

.container .warning {
  height: 240px;
}

.warning {
  position: relative; 
  background-color:yellow;
  border: 12px solid transparent;
  border-radius: 10px;
  box-shadow: 1vw 1vh 4vh rgba(255, 192, 203, 0.2);
  font-size:16px;   
  background-size:3em 3em;  
  background-image:
  linear-gradient(#fff,#fff),
  linear-gradient(-45deg,transparent 0em,
		transparent 1em,
		pink 1em,
		pink 2.1213em,	
		transparent 2.1213em,
		transparent 3.1213em,
		pink 3.1213em	                    		
	);
  background-clip:padding-box,border-box;
  
  -webkit-animation: warning-animation 750ms infinite linear;
  -moz-animation: warning-animation 750ms infinite linear;
   animation: warning-animation 750ms infinite linear;
}
@-webkit-keyframes warning-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 3em 0;
  }
}
@-moz-keyframes warning-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 3em 0;
  }
}
@keyframes warning-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 3em 0;
  }
}

</style>
</head>
<body>
	<div class="container">
		<div class="warning">
		</div>
	</div>
</body>
</html>