数据源来自:http://www.cnblogs.com/insus/archive/2013/02/03/2890852.html 今天再去微软网站下载哪些图片时,发现windows的图标颜色变了。

现在的问题是,在这些图片绑定至RadioButtonList控件时,图片应该是Vertical对齐。
还是先来看看前一帖在浏览时,它的html源代码:
RadioButtonList控件绑定图片Vertical对齐


上图高亮部位的代码,就是每个选项产生的代码,有它有一个input标签,type为Radio,一个Label标签和Label标签内还有一个img标签组成。根据这些特征,我们在网页写一个样式style:

<style type="text/css">
        input[type="radio"], input[type="radio"] + label img {
            vertical-align: middle;
        }
    </style>


好的,我们再来浏览一次,不过在RadioButtonList添加两个属性,让其横排显示。

 RepeatColumns="5" RepeatDirection="Horizontal"


效果图:
RadioButtonList控件绑定图片Vertical对齐

 

相关文章:

  • 2021-12-03
  • 2021-09-16
  • 2021-11-17
  • 2022-01-14
  • 2022-02-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2022-01-05
  • 2022-01-17
相关资源
相似解决方案