我遇到的问题是视频的侧面或顶部/底部总是有黑条,具体取决于屏幕尺寸.

任何想法如何让它全屏显示总是没有显示恼人的黑条?并且不使用插件.
这是我的标记:
<div id="full-bg">
<div class="box iframe-box" width="1280" height="800">
<iframe src="http://player.vimeo.com/video/67794477?title=0&byline=0&portrait=0&color=0fb0d4" width="1280" height="720" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
#full-bg{
width: 100%;
height: 100%;
img{
display: none;
}
.iframe-box{
width: 100%;
height: 100%;
position: absolute;
background: url(../img/fittobox.png);
left: 0 !important;
top: 0 !important;
iframe{
width: 100%;
height: 100%;
}
}
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个全屏视频背景,即使在窗口调整大小时也始终显示完整大小.
这是网站:http: //webkunst.comeze.com/test/
这是我的问题:
在宽屏幕上它显示如下:http: //webkunst.comeze.com/test/wide.png
在垂直屏幕上,它显示如下:http: //webkunst.comeze.com/test/vertical.png
正如您所看到的那样,它总是会在视频中放置一些黑条,而不是将视频大小调整到整个屏幕.
这是我的标记:
<div id="full-background">
<video class="video-js vjs-fullscreen" autoplay preload="auto" poster="http://video-js.zencoder.com/oceans-clip.png" data-setup="{}">
<source src="video/1.mp4" type='video/mp4' />
</video>
</div>
Run Code Online (Sandbox Code Playgroud)
用这个css:
#full-background {
z-index: -999;
min-height: 100%;
min-width: 1024px;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
}
.video-js.vjs-fullscreen {
position: fixed;
overflow: hidden;
z-index: 1000;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100% !important;
height: 100% !important;
_position: absolute;
/* IE6 Full-window (underscore hack) …Run Code Online (Sandbox Code Playgroud) 我一直试图用div 做白色的形状:
http://sircat.net/joomla/sircat/mies/2.png
如何获得div底部的对角线形状?
我有这个div:宽度:620px; 身高:440px; 背景颜色:白色;
谢谢
编辑:忘记div后面的bg,我想用对角线边框制作div,而不是借助于bg,因为它位于顶层
我试图在页面上制作滚动效果,滚动会产生平滑效果,但它会错过项目的实际位置,并在点击几次后开始出错.
例如,如果你点击它最后一个项目,那么如果你点击第三个,滚动就会转到顶部(?).所以我觉得我在这里错过了一些东西.谁知道如何纠正这个问题?
这是我的标记:
<div id="sidebar" class="clearfix">
<ul>
<li>
<a href="#one" class="scroll">Muscles - Girls Crazy Go!</a>
</li>
<li>
<a href="#two" class="scroll">Tokyo Youth sports</a>
</li>
<li>
<a href="#three" class="scroll">Harajuku Interviews</a>
</li>
<li>
<a href="#four" class="scroll">Tokyo Youth</a>
</li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
Div滚动示例:
<div class="cinematography_box clearfix" id="two">
<div class="cinematography_item">
<img src="img/cinematography.jpg" alt="cinematography" width="700" height="397">
</div>
<div class="cinematography_info">
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
和我的脚本:
jQuery(document).ready(function($) {
$(".scroll").click(function(event){
event.preventDefault();
$('#main').animate({scrollTop:$(this.hash).offset().top}, 500);
});
});
Run Code Online (Sandbox Code Playgroud)
我试图在没有插件的情况下这样做,所以如果有这个代码的解决方案,那就更好了!
我想更改所选选项="已选择"的文本颜色:
<select class="select">
<option value="--">--</option>
<option value="2014">2014</option>
<option value="2013">2013</option>
<option value="2012" selected="selected">2012</option>
<option value="2011">2011</option>
</select>
Run Code Online (Sandbox Code Playgroud)
我一直在尝试CSS,但似乎不可能:
.select select [selected="selected"]{
color: #2b2b2b;
}
Run Code Online (Sandbox Code Playgroud)
有关jQuery的任何想法吗?
我正在使用wordpress的网站上工作,我正试图从帖子的高级自定义字段中获取缩略图:
<?php while ( have_posts() ) : the_post(); ?>
<h1><?php the_field('custom_title'); ?></h1>
<img src="<?php the_field('thumbnail'); ?>" alt="" />
<p><?php the_content(); ?></p>
<?php endwhile; // end of the loop. ?>
Run Code Online (Sandbox Code Playgroud)
问题是,当我加载网站时,图像获取的网址如下所示:
<img src="5, , item_alt2, , , http://portfolio.local/wp-content/uploads/2012/09/item_alt2.jpg, Array">
Run Code Online (Sandbox Code Playgroud)
因此,据我所知,它正在寻找图像的插件,但它加载了一个奇怪的路径,所以它显示像"破碎"的图像.
我做错了什么?
5, , item_alt2, , , http://portfolio.local/wp-content/uploads/2012/09/item_alt2.jpg, ArrayNULL
Run Code Online (Sandbox Code Playgroud) 问题是,在屏幕doesn't适应视口(无白边对边时,第一负载),也使得一个奇怪的大白边的权利,如果你缩小,看到整个页面.
我使用这个标签试图实现,但仍然没有太多工作:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=3.0, user-scalable=yes">
<meta name="apple-mobile-web-app-capable" content="yes" />
Run Code Online (Sandbox Code Playgroud)
这是我的css:
body {
background-color:#fff;
font-family:'Droid Sans', arial, sans-serif;
color: #777;
width: 100%;
margin: 0;
}
#page {
width: 950px;
margin: 0px auto;
padding:0px;
background-color:#fff;
z-index: 0;
}
Run Code Online (Sandbox Code Playgroud)
任何想法我该如何解决?
我生成了这个标记,我无法修改它:
<h2>Title</h2>
<p>text</p>
<p>text</p>
<p>text</p>
<h3>Title</h3>
<p>text</p>
<p>text</p>
<p>text</p>
<p>text</p>
<p>text</p>
<h3>Title</h3>
<p>text</p>
<p>text</p>
Run Code Online (Sandbox Code Playgroud)
我想要的是使用jQuery包装它:
<div class="article">
<h2>Title</h2>
<p>text</p>
<p>text</p>
<p>text</p>
</div>
<div class="article">
<h3>Title</h3>
<p>text</p>
<p>text</p>
<p>text</p>
<p>text</p>
<p>text</p>
</div>
<div class="article">
<h3>Title</h3>
<p>text</p>
<p>text</p>
</div>
Run Code Online (Sandbox Code Playgroud)
任何想法怎么做?正如您所看到的p标签数量不同所以我不知道如何定位.
我试图设置"li"的高度,其中"display:inline"为css.我知道内联元素重置高度,但我需要它显示:内联只是文本对齐中心列表.
这是我的css:
li{
font-size: 28px;
border-right: 1px solid #b9b9b9;
margin-right: 15px;
padding-right: 15px;
line-height: 40px;
display: inline;
text-align: center;
color: #ffffff;
}
Run Code Online (Sandbox Code Playgroud)
我需要修改高度以根据文本高度显示边框高度,这就是现在正在发生的事情:

有什么想法解决这个问题吗?记住,我需要显示内联文本对齐中心列表上的ul.
如果还有其他方式进行文本对齐:中心列表也有助于我认为......
我有这个结构:
<div class="container" style="height:(variable height)">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
<div class="container" style="height:(variable height)">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
<div class="container" style="height:(variable height)">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
Run Code Online (Sandbox Code Playgroud)
所以我需要每个人.box获得父母的高度,这个.container高度与另一个人的身高不同,并且会有所不同.
我只需要jQuery方法,没有CSS因为我不想使用absolute位置,table-cell或者其他任何操作.
谢谢!
我正在尝试使用常规wp_query列出帖子标题,只是为了将项目的href添加到永久链接,这是我正在使用的代码:
<?php $the_query = new WP_Query( 'post_type=artworks_post' );
// The Loop
while ( $the_query->have_posts() ) : $the_query->the_post();
echo '<a rel="' .the_permalink(). '" href="' .the_permalink. ' ">';
the_title();
echo '</a>';
endwhile;
// Reset Post Data
wp_reset_postdata();
?>
Run Code Online (Sandbox Code Playgroud)
问题是代码不起作用,它只返回带有"永久链接"一词的href,但没有链接本身.
我在这里做错了什么?
我现在有功能:
<?php while ( have_rows('proyects') ) : the_row(); ?>
<div class="box">
<p><?php the_sub_field("texte");?></p>
</div>
<?php endwhile; ?>
Run Code Online (Sandbox Code Playgroud)
哪个输出如下:
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
Run Code Online (Sandbox Code Playgroud)
问题是我希望它每三个输出box一个div容器,所以最终的结果应如下所示:
<div class="container">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
<div class="container">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
<div class="container">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
Run Code Online (Sandbox Code Playgroud)
最好的方法是什么?
html ×8
jquery ×8
css ×7
javascript ×6
ajax ×3
php ×3
wordpress ×3
css-shapes ×1
field ×1
geometry ×1