A problem encounters when a friend does a webpage today: Want to withhold the setting of the link, but should link the character in to disappear again! But was done a long time,do not have method all the time this character take out. I think a lot of friends that learn a standard had encountered this problem, here I draw up a few commonly used methods come, also tell train of thought, the hope can help the friend that just began study.
“To in an attempt to exchanges a word ” replace a character to behave with the picture namely. We know, it is very poor that the character appears a form in the watch in the browser, can have toothed, not method is fruity still have do not have method to do a lot of results. Usually the content part of the webpage does not need to do the result, but in WEB standard to LOGO, caption, often need to use these. If be done with form, we just are on post of a certain place a piece of graph, such way is simpler, but go against a search. So we need to use standard way to do, make sure the webpage is in a kind of good position and be helpful for searching. Normally to in an attempt to shows disappear: (Display:nThis just does not let One;) the content inside container disappears include container itself to disappear however. So we need in the redo inside container a container assures inside disappear after the part, the setting inside container can show normally. Exemple:
</div>#logo {display:n of content of <div Id="logo"> captionOne; Background:URL; Width:300px; Height:100px;}
Write if so so you are essential whats cannot see. Is that right kind what is written? Watch give a demonstration:
</span></div>#logo {background:U of content of <div Id="logo"><span> captionRL; Width:300px; Height:100px;}#logo Span {display:nOne;}
Everybody notices the code above, setting is give a definition in #logo, and below #logo Span besides Display:nOne; does not have any styles. Because was defined Display:nThe container of One; attribute can see without place, if define other style,also be wasteful. Light is still have a problem so, this is an example that did not link, how to when that has a link, do? We see a case again:
</a></div>#logo {background:U of content of caption of "> of caption of <div Id="logo"><a Href="URL" Title="RL; Width:300px; Height:1{display:n of of of of of 00px;}#logo AOne;}
Does everybody guess this code to you can show a stuff? The fact is setting showed, but the link was done not have. Had said above us: Be endowed with at Display:nThe container oneself of One; attribute also can disappear. Then we were clear about, need to add a container in this A label surely. We watch give a demonstration again:
</span></a></div>#logo {background:U of content of caption of "><span> of caption of <div Id="logo"><a Href="URL" Title="RL; Width:300px; Height:100px;}#logo A Span {display:nOne;}
Such be correct? Still be no good, why, we know A is not a class label, that is to say content decides the Gao Kuan of A, content disappeared now, the attribute that also did not have this Gao Kuan, so this link also became a link that did not heat up an area. The dot does not wear the likelihood. We need need revises the code redo above.
</span></a></div>#logo A {background:U of content of caption of "><span> of caption of <div Id="logo"><a Href="URL" Title="RL; Width:300px; Height:100px; Display:bLock;}#logo A Span {display:nOne;}
The attribute of the A label here must add Display:bLock; is him compulsively a class element. Such A label became wide for 300 it is high 100, a setting does not have the link form of literal content. Everybody saw above still added label of a Span in A label, seem a bit redundant. Can need not Span also can achieve the result. Can, train of thought is different nevertheless, however the law of shift of this kind of position below.
The position is mobile: Let content namely ah cent undertakes the position moves, move an indication area besides. We still see code know this method.
</a></div>#logo of content of caption of "> of caption of <div Id="logo"><a Href="URL" Title=" , #logo A {width:300px; Height:100px; Overflow:hIdden;}#logo A {background:URL; Padding:100px 0 0; Display:bLock;}
#logo and A were installed to one spills over in CSS conceal (Overflow:hIdden;) has those who exceed 300*100 size to be able to be concealed that is to say. We saw A be defined a Padding:100px 0 0; of this coping inside was apart from as it happens to overwhelm content to show a region beyond. That why #logo also should use Overflow:hWhere is Idden; ? Because be in,a small BUG can appear below IE, the content of A does not have method to spill over cache needs to add an Overflow:h even on father degree label with needingIdden;
Above content is two kinds of my more commonly used methods only, still can have method of a few otherwise of course, these methods have respective faulty, also have between all sorts of methods nevertheless complementary. Can choose to use according to the circumstance when application can.
Bookmark:Digg Del.icio.us Reddit
