gpt4 book ai didi

bootstrap-4 - Bootstrap4 单选按钮背景和填充颜色

转载 作者:行者123 更新时间:2023-12-03 17:57:22 24 4
gpt4 key购买 nike

我想知道如何更改 Bootstrap 单选按钮背景颜色和填充颜色?

<div class="form-check">
<input class="form-check-input" type="radio" name="radio" id="radio1" value="option1">
<label class="form-check-label" for="radio1"> radio label
</label>
</div>

最佳答案

见代码:

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

<style>
.custom-control-input:checked ~ .custom-control-label::before {
color: #fff;
border-color: #7B1FA2;
background-color: #7B1FA2;
}
</style>

<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline1" name="customRadioInline1" class="custom-control-input">
<label class="custom-control-label" for="customRadioInline1">Toggle this custom radio</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline2" name="customRadioInline1" class="custom-control-input">
<label class="custom-control-label" for="customRadioInline2">Or toggle this other custom radio</label>
</div>

关于bootstrap-4 - Bootstrap4 单选按钮背景和填充颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48401587/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com