Home >Web Front-end >HTML Tutorial >Please help me write the css style as shown in the picture, thank you_html/css_WEB-ITnose

Please help me write the css style as shown in the picture, thank you_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:03:081015browse


Please help me write the css style as shown in the picture. The position is in the center of the page. The size of the button is: 190px*50px. The colors are orange (#FF7100) and white (#FFFFFF). When the mouse is clicked, the styles of the two are swapped.
Please help write it down.
Thank you.


Reply to the discussion (solution)

jquery's addClass, removeClass; the two methods are very simple

jquery's addClass, removeClass; the two methods are very simple


The key is that the styles of the two buttons are not very good, and I can write them in js.

Add click events for the two buttons btn1 and btn2

$('#btn1').click(function(){$(this).addClass('class1');$('#btn2').addClass('class2');})

It is inevitable to make mistakes when typing by hand. . . .

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn