单选按钮设置不变

时间:2013-02-23 19:33:51

标签: css html5 google-chrome webkit radio

我在使用一组2个单选按钮时遇到了一些麻烦,在Chrome中,无论使用鼠标还是使用键盘,它都不会改变状态。

这是HTML:

<!-- Dialog Boxes -->
    <section class="add-movie-dialog">
        <section class="dialog-box">
            <form class="dialog-container" name="add-movie-dialog-form" action="">
                <header class="dialog-title">
                    New movie.
                </header>
                <section class="dialog-content">
                    <p>
                        Add a new movie to the library:
                    </p>
                    <input type="radio" name="add_option" value="file" checked="checked" />by selecting a file...
                    <br />
                    <input type="radio" name="add_option" value="empty" /> empty entry...
                </section>
            </form>
        </section>
    </section>

这是CSS(实际上更少但足够接近):

    .add-movie-dialog {
    #mixin.flex-container( column, center, stretch, nowrap );
    background: fadeout( @black, 50% );
    height: 100%;
    left: 0px;
    line-height: 1.5em;
    position: fixed;
    top: 0px;
    width: 100%;
    .dialog-box {
        #mixin.flex-container( column, flex-start, center, nowrap );
        background: @darkgrey;
        padding: 2em;
        .dialog-container {
            width: 66%;
            .dialog-title{
                #mixin.font( x-large );
                padding-bottom: 1em;
            }
            .dialog-content{
                letter-spacing: 0.1em;
                padding-bottom: 1em;
                & > p {
                    padding-bottom: 10px;
                }
            }
        }
    }
}

这是它的形象:

sample image

现在,突出显示的单选按钮不会使用鼠标或键盘更改为“空条目”而且我很难过为什么,因为afaik代码有效且应该有效(除非我在这里遗漏了一些东西)。


解决

似乎我在我正在使用的JS文件中留下了一些旧的javascript,这与选择相混淆,但是在删除了有问题的JS块后,它自行调整了。

0 个答案:

没有答案
相关问题