小编Mic*_*ker的帖子

在背景上设置YouTube视频

我正在使用bootstrap,我想在背景上设置youtube视频

我找到了这个.如何更改此代码以使用来自youtube的视频?替换不起作用

    @import url('http://fonts.googleapis.com/css?family=Oswald');
    
    body {
      margin: 0;
      padding: 0;
      background-attachment: fixed;
      background-size: cover;
    }
    
    #video-background {
      position: fixed;
      right: 0; 
      bottom: 0;
      min-width: 100%; 
      min-height: 100%;
      width: auto; 
      height: auto;
      z-index: -100;
    }
Run Code Online (Sandbox Code Playgroud)
    <video autoplay="" loop="" class="fillWidth fadeIn animated" poster="https://s3-us-west-2.amazonaws.com/coverr/poster/Traffic-blurred2.jpg" id="video-background">
        <source src="https://s3-us-west-2.amazonaws.com/coverr/mp4/Traffic-blurred2.mp4" type="video/mp4">
    </video>
Run Code Online (Sandbox Code Playgroud)

html css youtube video twitter-bootstrap

8
推荐指数
4
解决办法
5万
查看次数

HTML/CSS 帮助使链接悬停填充整个导航栏

当我们将鼠标悬停在链接上时,我试图使导航栏完全突出显示,但它目前只能水平工作。我认为这是我做错的很小的事情并且已经尝试了四个小时。这是我的代码:

    html, body { 
    
    /*require html and body 100% height and width to allow other child elements to use percentages*/
    
    	height: 100%; 
    	width: 100%; 
    	margin: 0;
    
    }
    
    a {
    	text-decoration: none;
    	display: block;
    	color: black;
    }
    
    li {
    	list-style: none;
    }
    
    
    div{
    	margin-left: 2.5%;
    	margin-right: 2.5%;
    	margin-top: 1%;
    	border: 1px solid black;
    }
    
    .content_section{
    	height: 150%;
    	margin-bottom: 1%;
    }
    
    #footer{
    	height: 25%;
    	margin-bottom: 1%;
    }
    
    #banner{
    	margin-top: 2.5%;
    	height: 15%;
    	position: relative;
    }
    
    #banner img{
    	width: 100%;
    	height: 100%;
    } …
Run Code Online (Sandbox Code Playgroud)

html css web

0
推荐指数
1
解决办法
1267
查看次数

标签 统计

css ×2

html ×2

twitter-bootstrap ×1

video ×1

web ×1

youtube ×1