2013-03-21 63 views
1

这一个真的让我困惑。这可能是我错过了一些简单的事情,但我肯定找不到它......只有CSS和HTML的标签没有正确响应

我创建了一个fiddle来向你展示我在说什么。

您最初看到这有4个部分,这些滚动通过正常工作的所有链接罚款。客户已经添加了1个部分,现在由于某种原因,当我添加更多的无线电链接时,幻灯片放映的整个控制权都会流入。 See what I mean here.

我所添加的所有内容都是一个额外的链接和内容区域。有谁知道我做错了什么?如果你从jsfiddle中删除了下面的内容,你会发现它可以正常工作,但是标签为5的标签会放弃。我很茫然......任何帮助非常感谢!

<input id="tab-5" type="radio" name="radio-set" class="tab-selector-5" /> <label for="tab-5" class="tab-label-5">POS</label> 

<div class="content-5"> <h2>Fullfilment</h2> <p>Whatever your project involves Expressive Print are experienced in delivering it for you. From daily pick and pack requirements to contract packing and bulk despatches we have the ideal space to work in - clean, modern and secure premises with packing teams who are all fully CRB checked, robust stock control systems, comprehensive insurance cover and expertise. This ensures the right things are packed in the right order and sent the right people – simple but critical. Selecting a fulfilment partner who has strong systems with full accountability and customer service resource is vital to ensure your product’s success.</p> </div> 

回答

0

演示您的Jsfiddle

现在你只要在你的CSS文件中添加一行CSS

.tabs input.tab-selector-1:checked ~ .content .content-1, 
.tabs input.tab-selector-2:checked ~ .content .content-2, 
.tabs input.tab-selector-3:checked ~ .content .content-3, 
.tabs input.tab-selector-4:checked ~ .content .content-4, 
.tabs input.tab-selector-5:checked ~ .content .content-5 // add this line in your css file 
{ 
    -webkit-transform: translateY(0px); 
    -moz-transform: translateY(0px); 
    -o-transform: translateY(0px); 
    -ms-transform: translateY(0px); 
    transform: translateY(0px); 
    z-index: 100; 
    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; 
    filter: alpha(opacity=100); 
    opacity: 1; 
    -webkit-transition: all ease-out 0.3s 0.3s; 
    -moz-transition: all ease-out 0.3s 0.3s; 
    -o-transition: all ease-out 0.3s 0.3s; 
    -ms-transition: all ease-out 0.3s 0.3s; 
    transition: all ease-out 0.3s 0.3s; 
} 

Demo

+0

哇,我知道这将是一些简单的!非常感谢您发现!我也注意到需要下面的css,我已经添加了这个和你的额外的行jsfiddle,但仍然发现重新打印的链接不工作,任何想法,为什么这可能会发生? http://jsfiddle.net/j9Ftx/8/ .tabs input#tab-5 { \t top:120px; } – Ria 2013-03-21 13:36:33

+0

其实你可以忽略这个评论,我刚刚更新我的文件,根据jsfiddle和所有工作正常:)非常感谢你的帮助!你是个明星! – Ria 2013-03-21 13:39:02

+0

嗨,我遇到了另一个问题。客户端刚刚要求将图片添加到背景中,我已经完成了这一操作,并且在Chrome和IE中运行良好。然而,在Safari中图像被切断,请参阅http://jsfiddle.net/j9Ftx/11/我所指的。 CSS中必须有一些控制宽度的选项卡,但我找不到。感谢您的任何帮助 – Ria 2013-04-25 11:10:41