html中redio单选框与文字对齐方法

2024-10-12 16:38:13

html中radio是一个特殊的标签,通常不经过处理,很难与同一标签内文字对齐,一般处理都很难达到自己想要的效果

工具/原料

VSCode前端工具

第一步

1、打开VSCode前端工具,新建html页面,输入<div class="analysis-redio">稆糨孝汶; <span class="title">时间<input type="radio" name="period" checked="checked" class="conent" value="0" v-model='date.period'/></span> <span class="title">季度<input type="radio" name="period" checked="" class="conent" value="1" v-model='date.period'/></span> </div>

html中redio单选框与文字对齐方法

第二步

1、在每个radio上加上样式vertical-align: middle; margin-top: -2px; margin-bottom: 1px;

html中redio单选框与文字对齐方法
猜你喜欢