gpt4 book ai didi

asp.net - RadioButton 文本样式

转载 作者:太空宇宙 更新时间:2023-11-03 19:07:03 25 4
gpt4 key购买 nike

我有以下标记:

在哪里

.checkBoxImg input { vertical-align:top; margin-top:5px;}

this.rbtnAssessedNo.Text = "<img src='images/icons/icon_no.gif' /><span style=\"margin-top:5px; vertical-align:top\">No</span>";

我得到 RadioButtons 文本:img (27x27px) 和文本:NO(16x16px),其中 margin-top:5px 不起作用,它相对于 img 而言是高的。此外,当我将垂直对齐更改为中间时,它会转到整个 RadioButton 范围的底部,这也是错误的。

我的目标是获取 img 和位于 img 中间的文本 NO(距离顶部大约 5px 就可以)。我做错了什么?

最佳答案

span 通常是 line dependent 并且它们不像 div 那样像盒子。因此他们倾向于不保留您设置的利润率。

将其更改为 div 并使用 display:inline 将设置边距。

关于asp.net - RadioButton 文本样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9862059/

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