在我的html中,我很好奇使用唯一标识符(例如<toys> </toys>保存图片)而不是语义是否正确<h2>。例如:
是否首选: <toys class="grid_4 push_2"> </toys>
与CSS:
toys {
background: url("toys.png") no-repeat scroll 0 0 transparent;
width: 181px;
height: 93px;
margin-top: -8px;
}而不是:我目前有: <h1 class="grid_4 push_2"> </h1>
与CSS:
h1 {
background: url("toys.png") no-repeat scroll 0 0 transparent;
width: 181px;
height: 93px;
margin-top: -8px;
}像<toys>语义上一样使用唯一标识符是否正确?
白衣非少年
红糖糍粑
随时随地看视频慕课网APP