<a href="page-url" style="pointer-events: none;">Click here</a>Many use :target to make it work, however, this is not always the best choice if we consider its jumping behavior - click on the link below to see what happens:
Link with target
<style>Another option is to use the :focus selector which will make the hidden content to expand on mouse click.
#linktarget {display: none;}
#linktarget:target {display: block;}
</style>
<a href="#linktarget">Link with target</a>
<div id="linktarget">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu cursus dui, ac fermentum eros. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce elementum sapien et augue fringilla aliquam. Ut a viverra libero, eget commodo nisi. Maecenas ultrices facilisis dignissim.
</div>
The advantage of this selector is that the page stays still, however, we have to click anywhere "outside" to close the expanded content and besides this, the hidden content should be immediately after, with no intermediate tags:
Demo with focus
<style>The last method is more fancy even though it requires more tags but it works the best since it allows us to create a toggle effect, i.e., expand on click and then collapse when clicking again. In this case, we'll use the :checked selector:
.focuselector {display: none;}
span:focus ~ .focuselector {display: block;}
</style>
<span tabindex="0">Link with focus</span>
<div class="focuselector">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu cursus dui, ac fermentum eros. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce elementum sapien et augue fringilla aliquam. Ut a viverra libero, eget commodo nisi. Maecenas ultrices facilisis dignissim.
</div>
<style>To apply these effects on the links and content that you want to hide and expand only on mouse click is very easy: when you create a post, paste one of the codes above inside the HTML box and replace the text in blue with the name of your link and add your text instead of the green one.
.checked-selector {display: none;}
:checked ~ .checked-selector {display: block;}
input.hidden[type=checkbox] {position: absolute;left: -999em;}
</style>
<label for="toggle-hidden">Demo with checked</label>
<input type="checkbox" id="toggle-hidden" class="hidden" />
<div class="checked-selector">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu cursus dui, ac fermentum eros. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce elementum sapien et augue fringilla aliquam. Ut a viverra libero, eget commodo nisi. Maecenas ultrices facilisis dignissim.
</div>
structured settlement buyer Casino Classes Claim Geographical Location of the Visitors Insurance STRUCTURED ANNUITY SETTLEMENT small business administration sba Attomey MISSISSIPPI MESOTHELIOMA LAWYER Gas/Electricity Insurance Blogs CRIMINAL DEFENSE ATTORNEY PALM BEACH Donate MOTORCYCLE ACCIDENT ATTORNEY LOS ANGLES Loans Lawyer Trading Donate cars in ma Mortgage DAYTON FREIGHT LINES Credit Software AUTO ACCIDENT LAWYER DENVER Business Recovery How much to sell domain name for Transfer SELLING A STRUCTURED SETTLEMENT ANNUITY Online Classes Fatcow Hosting Attormey Health Business · PaperPort Promotional Code Rehab eCommerce sites Conference Call Treatment Donate Car for Tax Credit Cord Blood Data Recovery Services Donate Car to Charity California structured settlement annuity companies donate old cars to charity Degree Blogs Based On Donations mesothelioma attorneys california Mesothelioma Law Firm · Mortgage Adviser Digital Photography Web Hosting and Domains Laws and lawyers All topics related to traffic from USA ANNUITY SETTLEMENT NUNAVUT CULTURE mesothelioma survival rates Auto insurance affiliate program structured settlements annuities Nunavut culture mesothelioma suit
0 comentarios:
Publicar un comentario