日期:2014-05-17  浏览次数:20444 次

请教 gridview里的模板列里的asp:CheckBox怎么改变它的大小?
改来改去还是不行,要么改的是列本身的大小而不是asp:CheckBox的大小?

请问高人,谢谢了!


------解决方案--------------------
引用:
改来改去还是不行,要么改的是列本身的大小而不是asp:CheckBox的大小?

请问高人,谢谢了!

用css改。但是各个浏览器有区别。

<style type="text/css">
<!--
input.checkbox  {
    width : 0.5em;
    height :2.5em;
    padding: 0px;
    margin: 0px;
    }

-->
</style>

------解决方案--------------------
引用:
引用:引用:改来改去还是不行,要么改的是列本身的大小而不是asp:CheckBox的大小?

请问高人,谢谢了!
用css改。但是各个浏览器有区别。
CSS code?1234567891011<style type="text/css"><!--input.checkbox  {    widt……

我在ie 和chrome试过了 都可以变。但是最大尺寸有限制
http://jsfiddle.net/
你把下面的源码自己贴了试
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
input.checkbox  {
    width : 0.5em;
    height :0.5em;
    padding: 0px;
    margin: 0px;
    }

-->
</style>
</head>

<body>
<table  border="1" >
  <tr>
    <td ><input type="checkbox" name="checkbox"  class ="checkbox" value="checkbox"></td>
    <td ><input type="checkbox" name="checkbox" class ="checkbox"  value="checkbox"></td>
    <td ><input type="checkbox" name="checkbox" class ="checkbox"  value="checkbox"></td>
  </tr>
  <tr>
    <td ><input type="checkbox" name="checkbox"   value="checkbox"></td>
    <td ><input type="checkbox" name="checkbox"   value="checkbox"></td>
    <td ><input type="checkbox" name="checkbox"   value="checkbox"></td>
  </tr>
  
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
&nb