小编Vir*_*hli的帖子

如何使视频适合div?

我需要一些帮助.我知道这篇文章以前已经完成,但我试过的任何内容都不适合我.所以基本上我有一个300px到250的div,我想让我的视频适合这个而不用300到250的视频.你能不能帮我谢谢!:)

body {
  margin: 0;
}

#banner{
	position:fixed;
	margin:0;
	width:300px;
	height:250px;
	border: 1px solid red;
}

#banner video{
    position: fixed;
    width: 300px !important;
    height: auto !important;
    background: url('//demosthenes.info/assets/images/polina.jpg') no-repeat;
    background-size: cover;
    transition: 1s opacity;
    z-index:-1;
}
Run Code Online (Sandbox Code Playgroud)
<div id="banner">
<video autoplay  poster="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/polina.jpg" id="bgvid" loop >
  <!-- WCAG general accessibility recommendation is that media such as background video play through only once. Loop turned on for the purposes of illustration; if removed, the end of the video will fade in the same …
Run Code Online (Sandbox Code Playgroud)

html css html5-video

3
推荐指数
1
解决办法
2万
查看次数

将此css运动模糊效果反转为垂直

我有这个代码,允许对象运动模糊并排,但我希望它垂直运动蓝色,所以它从上到下,然后再回到上面.你能帮帮我吗?

http://jsfiddle.net/db8gr4y6/

  #outer {
    position: relative;
    margin: 10px;
  }
  #mb {
    position: absolute;
    left: 0;
    font-size: 2em;
    font-weight: bold;
    padding: 0.2em 1em;
    color: #fff;
    background-color: #600;
    border: 0.2em solid #c00;
    border-radius: 8px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0);
    box-shadow: 0 0 2px rgba(200, 0, 0, 0);
    -webkit-animation: motionblur 4s ease-in-out infinite;
    animation: motionblur 4s ease-in-out infinite;
  }
  @-webkit-keyframes motionblur {
    0% {
      left: 0;
      text-shadow: 0 0 0 rgba(255, 255, 255, 0);
      box-shadow: 0 0 0 rgba(200, 0, …
Run Code Online (Sandbox Code Playgroud)

html css css3 css-transitions css-animations

3
推荐指数
1
解决办法
352
查看次数

如何减慢关键帧动画?

我有这个代码:

.blur {
  -webkit-animation: blur 5s ;
  -webkit-animation-fill-mode: forwards;
}

@-webkit-keyframes blur {
  0% { -webkit-filter: blur(0px); }
  0% { -webkit-filter: blur(1px); }
  50% { -webkit-filter: blur(5px); }
  60% { -webkit-filter: blur(5px); }
  100% {
    opacity: 0;
  }
}
Run Code Online (Sandbox Code Playgroud)
<img src="http://placehold.it/350x150" class="blur" />
Run Code Online (Sandbox Code Playgroud)

基本上我有一个图像,我想要的效果是慢慢淡入,模糊然后淡出。但是当它模糊时,我希望它在那里停留几秒钟,然后淡出图片。你能帮我一下吗?谢谢

css animation keyframe

2
推荐指数
1
解决办法
1317
查看次数