<tfoot id='2lu7B'></tfoot>
    1. <legend id='2lu7B'><style id='2lu7B'><dir id='2lu7B'><q id='2lu7B'></q></dir></style></legend>

      <i id='2lu7B'><tr id='2lu7B'><dt id='2lu7B'><q id='2lu7B'><span id='2lu7B'><b id='2lu7B'><form id='2lu7B'><ins id='2lu7B'></ins><ul id='2lu7B'></ul><sub id='2lu7B'></sub></form><legend id='2lu7B'></legend><bdo id='2lu7B'><pre id='2lu7B'><center id='2lu7B'></center></pre></bdo></b><th id='2lu7B'></th></span></q></dt></tr></i><div id='2lu7B'><tfoot id='2lu7B'></tfoot><dl id='2lu7B'><fieldset id='2lu7B'></fieldset></dl></div>

        <bdo id='2lu7B'></bdo><ul id='2lu7B'></ul>

        <small id='2lu7B'></small><noframes id='2lu7B'>

      1. 没有标签的样式单选按钮

        时间:2023-10-21
        • <i id='46Sl0'><tr id='46Sl0'><dt id='46Sl0'><q id='46Sl0'><span id='46Sl0'><b id='46Sl0'><form id='46Sl0'><ins id='46Sl0'></ins><ul id='46Sl0'></ul><sub id='46Sl0'></sub></form><legend id='46Sl0'></legend><bdo id='46Sl0'><pre id='46Sl0'><center id='46Sl0'></center></pre></bdo></b><th id='46Sl0'></th></span></q></dt></tr></i><div id='46Sl0'><tfoot id='46Sl0'></tfoot><dl id='46Sl0'><fieldset id='46Sl0'></fieldset></dl></div>

              • <bdo id='46Sl0'></bdo><ul id='46Sl0'></ul>
                <tfoot id='46Sl0'></tfoot>

                <small id='46Sl0'></small><noframes id='46Sl0'>

                  <tbody id='46Sl0'></tbody>

                1. <legend id='46Sl0'><style id='46Sl0'><dir id='46Sl0'><q id='46Sl0'></q></dir></style></legend>
                2. 本文介绍了没有标签的样式单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我现在面临这个问题:我想为系统生成的没有标签的单选按钮复选框设置样式.

                  我正在使用 IBM SPSS Data Collection 进行在线调查,这意味着它会根据我可以设置样式的某些模板(主要是 CSS 样式)生成所有页面问题.

                  我发现很多教程如何使用纯 CSS 设置单选按钮和复选框的样式,问题是,所有这些都使用标签:<label for="id"></label>.关键是,生成的代码没有 <label>.

                  正如我所说,对象没有标签,例如单个单选按钮由此代码定义(我还想附上屏幕截图,但我没有足够的声誉点):

                  我尝试更改 html 代码以添加标签并且它有效,但这并不是我所需要的.此解决方案出现的问题是,我不能让系统轮换集成主题(问题),因为无法生成页面但必须明确编写.

                  当我使用这个解决方案(这不是一个合适的解决方案)时,我可以简单地使用 CSS 添加背景图像来重新设置带有标签的单选按钮和复选框:

                  input[type=radio]:not(old) + label{显示:内联块;左边距:-28px;padding-left : 40px;背景:url('radio_off.png')不重复0 0;背景尺寸:30px 30px;行高:35px;}输入[type=radio]:not(old):checked + label{背景 : url('/radio_on.png') no-repeat 0 0;背景尺寸:29px 29px;}

                  所以我的问题是:

                  • 有没有办法在没有标签的情况下重新设置单选按钮和复选框的样式?

                  • 有没有办法使用 javacsript 或其他方法为生成页面上的每个单选按钮或复选框添加假空白标签?

                  • 有没有其他方法可以解决这个问题而无需编辑生成的页面代码,例如我可以使用它是如何生成的页面吗?

                  如果我没有提供任何必要的信息,请索取,如果可以的话,我会提供.

                  非常感谢您的帮助!

                  问候,

                  彼得

                  解决方案


                  没有办法使用纯 CSS 来设置单选按钮的样式,但是您可以使用 CSS 和 JavaScript 混合来实现,在单选按钮上放置一个假图像并不显示单选按钮一开始,要做到这一点,是否有标签并不重要.如果您不想制作自己的脚本,有几个插件可以做到这一点:

                  • I am now facing this problem: I want to style radio buttons and checkboxes that are generated by system and do not have a label.

                    I am working with IBM SPSS Data Collection for making online surveys, so that means it generates all questions to page according to some template I can style (mostly styling with CSS).

                    I found out many tutorials how to style radio buttons and checkboxes using pure CSS, problem is, all of them are using label: <label for="id"></label>. Point is, that generaged code does not have <label>.

                    As I said, objects are without label, and single radio button for example is defined by this code (I wanted also attach screenshot how it looks like, but i do not have enough reputation points):

                    <td id="Cell.2.1" style="text-Align: Center;vertical-align: Middle;background-color: #e6efe6;width: 7%;border-color: Black;border-style: Solid;border-width: 0px;">
                      <div></div>
                      <input type="radio" name="_QQ3_Qa_QSingleResponseQuestion_C" id="_Q0_Q0_Q0_C1" class="mrSingle" style="font-family: Trebuchet MS;font-size: 9pt;" value="b"></input>
                    </td>
                    

                    I tried to change html code to add label and it worked, but it is not exactly what I need. Problem that occurs with this solution is, I can't let system rotate integrated subjects (questions), because page cannot be generated but have to be explicitly written.

                    When I used this solution (which is not suitable one), I could simply restyle radio buttons and checkboxes with lable using CSS adding background images like this:

                    input[type=radio]:not(old) + label{
                      display      : inline-block;
                      margin-left  : -28px;
                      padding-left : 40px;
                      background   : url('radio_off.png') no-repeat 0 0;
                      background-size:30px 30px;
                      line-height  : 35px;
                    }
                    
                    input[type=radio]:not(old):checked + label{
                      background   : url('/radio_on.png') no-repeat 0 0;
                      background-size:29px 29px;
                    }
                    

                    So my questions are:

                    • is there a way to restyle radio buttons and checkboxes without lable?

                    or

                    • is there a way to add fake blank lable to every radio button or checkbox on generated page using javacsript or something other?

                    or

                    • is there any other way I could solve this without need edit generated page code e.g. I can use page how it ist generated?

                    If I did not included any of the necessary informations, pleas ask for them, i will provide them if I am able to.

                    Thanks a lot for any help!

                    Regards,

                    Peter

                    解决方案


                    There is no way to style radio buttons with pure CSS, but you can do it with CSS and JavaScript mix, positioning a fake image over the radio and displaying to none the radio button At the beginning, to do this, to doesnt matter if you have a label or not. If you dont want to make your own script, there are several plugin to do this:

                    • http://www.hongkiat.com/blog/css3-checkbox-radio/
                    • http://www.csscheckbox.com/radio-buttons.php
                    • Even Ive my own plugin: http://albertofortes.com/projects/piscoPrettyForms/

                    In my plugin you don't need the label to style the radio button, there is a label but isn't use to style so you can remove it and still works.

                    See this code edited with Inspector tools:

                    这篇关于没有标签的样式单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  <tfoot id='5w6tM'></tfoot>
                    <i id='5w6tM'><tr id='5w6tM'><dt id='5w6tM'><q id='5w6tM'><span id='5w6tM'><b id='5w6tM'><form id='5w6tM'><ins id='5w6tM'></ins><ul id='5w6tM'></ul><sub id='5w6tM'></sub></form><legend id='5w6tM'></legend><bdo id='5w6tM'><pre id='5w6tM'><center id='5w6tM'></center></pre></bdo></b><th id='5w6tM'></th></span></q></dt></tr></i><div id='5w6tM'><tfoot id='5w6tM'></tfoot><dl id='5w6tM'><fieldset id='5w6tM'></fieldset></dl></div>

                    <legend id='5w6tM'><style id='5w6tM'><dir id='5w6tM'><q id='5w6tM'></q></dir></style></legend>
                      <bdo id='5w6tM'></bdo><ul id='5w6tM'></ul>

                          <tbody id='5w6tM'></tbody>

                      1. <small id='5w6tM'></small><noframes id='5w6tM'>