HTML and CSS Reference
In-Depth Information
width: 48px;
height: 48px;
float: left;
margin: 0px;
padding: 0px;
}
.piece
{
margin-left: 4px;
margin-top: 4px;
}
.bblack.drop
{
opacity: 0.5;
}
.piece.selected
{
opacity: 0.5;
}
</style>
</head>
<body>
<div class="board">
@for (int y = 0; y<8; y++)
{
for (int x = 0; x<8; x++)
{
string id = x.ToString() + y.ToString();
string css;
if ((x + y) % 2 == 0)
{
css = "bwhite";
}
else
{
css = "bblack";
}
<text>
<div id="@id" class="@css" draggable="false">
@if ((x + y) % 2 != 0 && y != 3 && y != 4)
{
string imgSrc;
string pid;
if (y < 3)
{
imgSrc = "Images/WhitePiece.png";
pid = "w"+id;
}
Search WWH ::




Custom Search