(1) Use DIV CSS to write the following effects as required:
Requirement: Write a centered red div block with a side length of 200px.
In what operating environment are you writing? Please give detailed tutorial on how to do it
Write in notepad, how to do it? Familiar with html and css
Can I preview it after writing it in the notepad? Time is very tight. There are still several questions. This is a team re-examination question
Can I preview it after writing it in the notepad? The time is special There are still a few more questions. This is a team re-examination question
What company’s re-examination questions... are so cheating~
<div style="width:200px; margin:0px auto">这是红块</div>
I am a student and have just come across these, thank you all.
(2) Use JavaScript and CSS to write the following effects
Requirement: When the mouse moves over the div block, the div color changes from red to blue.
3. Optional questions
(1) Use JavaScript to write the following effect
Requirement: When the mouse pointer clicks on a div block, the div slowly moves to the right (reminder: use the Interval() function ).
(2) Use JavaScript to write the following effect
Requirement: There are three div blocks of different colors side by side in the same row. Click on the first div block and it will change color with the following div block. Click on the second div block. It also changes color with the one behind it. Click the third one and it will change color with the first div block. (Reminder: Event bubbling in JavaScript needs to be solved).
In addition, the search box on the Baidu page also has the following steps:
(2)
<style> div{width:100px;height:100px;background:#f00;} #d1:hover{background:#00f;} </style> <div id="d1"></div> ---------------------------------------- <div id="d2"></div> <script> document.getElementById('d2').onmousemove=function(){this.style['background-color']='#00f';}document.getElementById('d2').onmouseout=function(){this.style['background-color']='#f00';} </script>
The one on the other Baidu page The search box and how to do the following
In addition, the search box on the Baidu page also has the following how to do it
In addition, the search box on the Baidu page And how to do the following
<div style="width:200px; margin:0px auto">这是红块</div>