CSS detail set (1)
1. When the text and the image are on one line, You need to align the text with the image bottom. You need to write it like this:
| 1 |
<li> Remember the password <img src="" align="bottom" style="margin-bottom:-4px"/> li> |
2. When the text and the image are in one line, You need to align the text and the image in the center. You need to write it like this:
| 1 |
<li> Remember the password <img src="static/img/xyx.jpg" align="middle"/> li> |
3. Change the editor opened by the IE "view source code" menu
- Open Registry Editor and enter regedit front-end UI sharing in start-run.
- Locate the following location: HKEY_LOCAL_MACHINE "SOFTWARE" Microsoft "Internet Explorer" View SourceEditor "Editor Name" and change the default data to "D:" Program Files”EmEditor”EmEditor.exe"
Switch to IE to view the source code.
If the View Source Editor "Editor Name item does not exist, you can create it by yourself.
4. automatically maximize the window inAndJoin:
| 1234 |
<script language="javascript">setTimeout('top.moveTo(0,0)',5000);setTimeout('top.resizeTo(screen.availWidth,screen.availHeight)',5000);</script> |
5. window. opener is actually the parent form of the form opened with window. open.For example, in the parent form parentForm, use the parent form open(#subform.html#), then in subform.html, window. opener
It indicates parentForm. You can set the value of the parent form or call the js method in this way.
- Window. opener. test ();-call the test () method in the parent form;
- If window. opener exists, set the stockBox value in parentForm. Frontend UI sharing
| 1234 |
if (window.opener && !window.opener.closed) { window.opener.document.parentForm.stockBox.value = symbol; } |
6. How to refresh the pageHow to refresh the page with Javascript:
- History. go (0)
- Location. reload ()
- Location = location
- Location. assign (location)
- Document.exe cCommand ('refresh ')
- Window. navigate (location)
- Location. replace (location)
- Document. URL = location. href
How to automatically refresh the page:
- Page Auto-Refresh: JoinRegion
- Automatic page Jump: JoinFrontend UI sharing in the region
- Automatically refresh js page:
| 1234567 |
<script language="JavaScript">function myrefresh(){ window.location.reload();}setTimeout('myrefresh()',1000); // Refresh once per second</script> |
JS refresh framework:
A) refresh the page containing the framework
| 123 |
<script language=JavaScript> parent.location.reload();</script> |
B) refresh the parent window in the Child Window
| 123 |
<script language=JavaScript> self.opener.location.reload();</script> |
Or
| 1 |
<a href="javascript:opener.location.reload()"> Refresh a> |
C) refresh the page of another framework
| 123 |
<script language=JavaScript> Parent. Another FrameID. location. reload (); script> |
7. If CSS hack is used, it should be known that it is a kind of hack named by underline. For example, if "_ style" is used, most browsers outside IE can ignore the definition of this style, therefore, when "_" is used as the name separator, It is nonstandard. An error is prompted during CSS check. Frontend UI sharing
VIII. Writing IE conditional comments Both Internet Explorer and Internet Explorer can be recognized.
All IE identifiable
Only IE5.0 can recognize
9. css hack writing
| 12345678910111213141516 |
/* First :*/.div {background:orange;*background:green !important;*background:blue;}/* Second :*/.div {margin:10px;*margin:15px;_margin:15px;}/* 3 :*/#div { color: #333; }*+html #div { color: #999; }* html #div { color: #666; } |