0

我有一个 div 是 display: none on page load。我还有一个按钮可以切换 div 的显示(无阻止)。页面加载后我第一次单击按钮并显示具有指定圆角的 div(图 1 和图 2)。然后我再次单击以隐藏 div 并单击以显示它。之后圆角混乱(图 2 和 3),div 扩展了一些额外的像素(高度),圆角不再圆角,并且其中有奇怪的“扫描线”线。

编码:

<div id="filter-advanced">
<label for="filter-veld-value">
    <div class="filter-block and-block2">EN <span>
        <select name="filter-veld" id="filter-veld-name">
        <option value="">Kies een zoekveld...</option>
        <option value="domeinnaam_registrant">Domeinnaam registrant</option>
        <option value="domeinnaam_houder">Domeinnaam houder</option>
        <option value="provider_opmerkingen">Provider opmerkingen</option>
        <option value="ftp_opmerkingen">FTP opmerkingen</option>
        <option value="mysql_opmerkingen">MySQL opmerkingen</option>
        <option value="accc_cms_opmerkingen">CMS opmerkingen</option>
        <option value="stats_opmerkingen">Statistieken opmerkingen</option>
        <option value="opmerkingen">Overige opmerkingen</option>
    </select>                       
        bevat tekst</span>
    </div>
    <div class="filter-block">
        <input type="text" id="filter-veld-value" name="filter-veld-value" class="text" value="" />
    </div>
    <br class="clearboth" />
</label>
<label for="filter-regdatum-from-value">
    <div class="filter-block and-block3">EN <span>registratiedatum tussen</span></div>
    <div class="filter-block" id="regdatum">
        <input type="text" id="filter-regdatum-from-value" name="filter-regdatum-from-value" class="text-date" value="X1" />&nbsp;en&nbsp;&nbsp;<input type="text" id="filter-regdatum-to-value" name="filter-regdatum-to-value" class="text-date" value="X2" />
    </div>
    <br class="clearboth" />
</label>
<label for="filter-vvdatum-from-value">
    <div class="filter-block and-block3">EN <span>vervaldatum tussen</span></div>
    <div class="filter-block" id="vvdatum">
        <input type="text" id="filter-vvdatum-from-value" name="filter-vvdatum-from-value" class="text-date" value="X3" />&nbsp;en&nbsp;&nbsp;<input type="text" id="filter-vvdatum-to-value" name="filter-vvdatum-to-value" class="text-date" value="X4" />
    </div>
    <br class="clearboth" />
</label>                        

和 jQuery

    $("p#advanced-tab A").click(function(){
    if ($(this).hasClass('inactive'))
    {
        $(this).removeClass("inactive");
        $(this).addClass("active");
        $(this).text("Minder opties [-]");
        $("#filter-advanced").css("display", "block");
        $(this).corner("10px tr tl");
    }
    else
    {
        $(this).removeClass("active");
        $(this).addClass("inactive");
        $(this).text("Meer opties [+]");            
        $("#filter-advanced").css("display", "none");
    }
});
$("#filter-advanced").corner("10px tr bl br");

替代文字 http://www.admixconnect.nl/images/TMPcorners/beeld1.jpg

替代文字 http://www.admixconnect.nl/images/TMPcorners/beeld2.jpg

替代文字 http://www.admixconnect.nl/images/TMPcorners/beeld3.jpg

替代文字 http://www.admixconnect.nl/images/TMPcorners/beeld4.jpg

4

1 回答 1

1

你用圆角滑动 div 吗?尝试滑动内部 div 吗?

于 2009-09-08T20:41:13.417 回答