我妈已经三天没打我了 2023-11-07 17:30 采纳率: 86%
浏览 4
已结题

input选框调整css位置

要写成图1这样的,但是实际上选框是图二这样的,该怎么调整呢
---------图1-----------

img

---------图二-----------

img

<div class="fdsyrzdcrs">
    <div class="fdsyrcheckcrs">
        <input class="beneficiarycheck" id="" type="radio" name="resRadio" value="1" onclick="getValuecrs(this)"/>
        <label for='fading'>全部是仅为中国税收居民</label>
    </div>
    <div class="fdsyrcheckcrs">
        <input class="beneficiarycheck" id="" type="radio" name="resRadio" value="2" onclick="getValuecrs(this)"/>
        <label class="crs_taxation_write" for="zhiding">部分是非居民或既是中国税收居民又是其他国家(地区)税收居民</label>
    </div>
    <div class="fdsyrcheckcrs">
        <input class="beneficiarycheck" id="" type="radio" name="resRadio" value="3" onclick="getValuecrs(this)"/>
        <label for="zhiding">全部是非居民或既是中国税收居民又是其他国家(地区)税收居民</label>
    </div>
    <div class="fdsyrcheckcrs">
        <input class="beneficiarycheck" id="" type="radio" name="resRadio" value="4" onclick="getValuecrs(this)"/>
        <label for="zhiding">本人确认上述信息的真实、准确和完整,且当这些信息发生变更时,将在30日内通知贵机构,否则本人承担由此造成的不利后果,点击声明文本前的勾选框,可进行勾选</label>
    </div>

.fdsyrzdcrs{
    background: #fff;
    line-height:1rem;
    padding:0.4rem 0;
    box-sizing: border-box;
}
.fdsyrcheckcrs{
    margin-top: 0.5rem;
    margin-left: 0.4rem;
    position: relative;
    /* width: 90%; */
    height: 100%;
}
.fdsyrcheckcrs input[type=radio]:before {
    position: absolute;
    /* top: 20%; */
    content: "";
    width: 0.84rem;
    height: 0.84rem;
    margin-top: -0.36rem;
    display: inline-block;
    background: url(../images/icon_check.png) no-repeat;
    background-size: cover;
    text-decoration: none;
    border-radius: 0;
    -webkit-font-smoothing: antialiased;
    /*background-size: 0.8rem 0.8rem;*/
    -webkit-appearance:none;
    padding:0!important;
    margin-left:0!important;
    margin-right:0!important;
}
.fdsyrcheckcrs input[type=radio]:checked:before {
      background: url(../images/icon_check.png) no-repeat 0 100%;
    background-size:cover;
     -webkit-appearance:none;
    padding:0!important;
    margin-left:0!important;
    margin-right:0!important;
    height: 0.8rem;
}

  • 写回答

3条回答 默认 最新

  • 兔兔软糖 2023-11-10 10:52
    关注
    
    .fdsyrzdcrs{
                background: #fff;
                line-height:1rem;
                padding:0.4rem 0;
                box-sizing: border-box;
            }
            .fdsyrcheckcrs{
                margin-top: 0.5rem;
                margin-left: 0.4rem;
                position: relative;
                /* width: 90%; */
                height: 100%;
                display: flex;
            }
            .fdsyrcheckcrs input{
                display: block;
                height: 1rem;
            }
            .fdsyrcheckcrs label{
                display: block;
                width: 90%;
            }
            .fdsyrcheckcrs input[type=radio]:before {
                position: absolute;
                /* top: 20%; */
                content: "";
                width: 0.84rem;
                height: 0.84rem;
                margin-top: -0.36rem;
                display: inline-block;
                /*background: url(../images/icon_check.png) no-repeat;*/
                background-size: cover;
                text-decoration: none;
                border-radius: 0;
                -webkit-font-smoothing: antialiased;
                /*background-size: 0.8rem 0.8rem;*/
                -webkit-appearance:none;
                padding:0!important;
                margin-left:0!important;
                margin-right:0!important;
            }
            .fdsyrcheckcrs input[type=radio]:checked:before {
                /*background: url(../images/icon_check.png) no-repeat 0 100%;*/
                background-size:cover;
                -webkit-appearance:none;
                padding:0!important;
                margin-left:0!important;
                margin-right:0!important;
                height: 0.8rem;
            }
    

    img

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 12月13日
  • 已采纳回答 12月5日
  • 修改了问题 11月8日
  • 修改了问题 11月8日
  • 展开全部

悬赏问题

  • ¥15 三分类机器学习模型可视化分析
  • ¥15 本地测试网站127.0.0.1 已拒绝连接,如何解决?(标签-ubuntu)
  • ¥50 Qt在release捕获异常并跟踪堆栈(有Demo,跑一下环境再回答)
  • ¥30 python,LLM 文本提炼
  • ¥15 关于将inet引入的相关问题
  • ¥15 关于一个倒计时的操作和显示设计
  • ¥15 提问STK的问题,哪位航天领域的同学会啊
  • ¥15 苹果系统的mac m1芯片的笔记本使用ce修改器使用不了
  • ¥15 单相逆变的电压电流双闭环中进行低通滤波PID算法改进
  • ¥15 关于#java#的问题,请各位专家解答!