1

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;} 

GridViewVisual Studio 10のaspxページに挿入しようとしています

しかし、私が望むように機能するものは何もないようです。最初の 2 つのケースでは、GridView セルの位置がずれていました。

できれば正しい方法を教えてください。

前もって感謝します

4

1 に答える 1

1

画像を使用する必要はありません。たとえば、CSS を使用して円を形成するだけです。

.circle {
    width: 320px;
    height: 320px;
    background: LightPink;
    -moz-border-radius: 160px;
    -webkit-border-radius: 160px;
    border-radius: 160x;
}

また、グリッド自体の形状を変更しないでください。ずれが発生する可能性があります。上記のクラスが適用された DIV 内にグリッドを配置します。

デモ: http://jsfiddle.net/pnFGt/

于 2013-09-18T14:10:44.767 に答える