Is it possible to have a non-rectangular div?

前端 未结 10 1981
滥情空心
滥情空心 2021-01-11 14:26

I need to shape ONE div tag in the following shape:

Is it possible to make it cross browser? I don\'t necessarily need rounded

10条回答
  •  难免孤独
    2021-01-11 14:46

    No. Divs are ALWAYS rectangular. You could fake it in a number of ways (using a background image would be one option).

    As for using two DIVs, sure you could. The hover could be done with CSS3 and child selectors of a parent div or you could JavaScript to change the class of both divs when hovering over either one of them.

提交回复
热议问题