开发者

CSS select only one item from table

Is there a way to disable multi-selection from a table in CSS? I have a table, and the user can select multiple items but 开发者_JAVA百科I want it to restrict it to one item, is there a way to do that through CSS?


Short answer: there was possibly going to be a way, but no, there isn't.

Long answer: one of the proposed values for user-select was element. If the property made (or makes...) it into CSS3, I think that'd be the style you'd use. No browser implements it per the proposal though, since it was nothing beyond an idea. Vendor implementations usually only have all, text and none to choose from, but not element or elements.


CSS does not control user selections.

The best you can do is put a transparent DIV over top of the area to prevent users from selecting it. They could also just use Firebug to delete this DIV.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜