开发者

Google Translate style select menus

I want to style an HTML select menu with CSS in a similar style to how Google does it on Google Translate (translate.google.com). I have looked for tutorials online but everything used jQuery. How can I make something similar to this but using CSS to s开发者_运维知识库tyle it?

I hope you can understand my question and what I am trying to describe.

Google Translate style select menus


What google does is have js build a completely different, and style-able html structure from normal dropdown box, which is then styled with css. Using click events on each of the languages a few hidden form elemnt values are edited as you choose new languages to translate between.

You can do the same with jQuery and some work.

I hope this clarifies how it works.


If you want to make similar thing just with CSS then forget it - plain impossible. Google utilizes javascript for certain functions like when user picks language it gets selected and will have border and different background when user will try translation next time.

If you just want similar dropdown function, then check here

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜