开发者

Drop-down box and buttons like in gmail

开发者 https://www.devze.com 2023-03-01 09:53 出处:网络
How to do this effects for <option> and 开发者_开发知识库<button> with CSS and JS?It\'s not real <select> or <button> element. The real form element would be (if it was a for

Drop-down box and buttons like in gmail

How to do this effects for <option> and 开发者_开发知识库<button> with CSS and JS?


It's not real <select> or <button> element. The real form element would be (if it was a form element at the beginning) replaced with simple styled <ul> (one of the options). And javascript is used to hide select element, replace it with list and attach events to list items / anchors.

Edit: Gmail apparentyl doesn't use list, but divs. That's also an option.. logic behind it is still same.


Try this. You have to change images and colors.

0

精彩评论

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