如何将 GridView 的方形更改为圆形,或者是否可以在圆形对象或图片上显示 gridview?
我已经尝试过:-
1-add cssclass to the gridview where css class had a line of code for a background image
2-applied headerclass css to the gridview and gave the image source there.
3-applied a backimage property to the Grid.
(the image in all the 3 cases was a circle)
CSS 是
.circle{ background:url(circle.png); opacity:0.5;height:176px;width:176px;}
我正在尝试在 visual studio 10 的 aspx 页面中插入 GridView
但似乎没有什么能按我想要的方式工作。在前两种情况下,GridView 单元格未对齐。
如果可能,请给我一个正确的方法。
提前致谢
最佳答案
你不必使用图像,例如使用 CSS 形成一个圆圈
.circle {
width: 320px;
height: 320px;
background: LightPink;
-moz-border-radius: 160px;
-webkit-border-radius: 160px;
border-radius: 160x;
}
另外,不要改变网格本身的形状——这可能会导致错位。将网格放置在应用了上述类的 DIV 中。
关于c# - 如何将 gridview 的形状更改为圆形?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18872077/