Is there a way to make a web page where you can only change the CSS display on a completely different page when viewed by the user?
Does csszengarden.com do what you think?
Cascading style sheets only affect the page style. As far as I understand, they do not provide any functions for changing the behavior or layout of the page.
, CSS. . http://csszengarden.com/ , , CSS.
, , , -
: , ? (Live Demo)
<body>
<style type="text/css"> body div { display: none; } body.blue div.blue { display: block; } body.red div.red { display: block; } </style> <body class="blue"> <div class="blue">Blue content!</div> <div class="red">Red content!</div> <div class="blue red">Content for both!</div> </body>
a >
, . , , , . , CSS , .
CSS /, , - - /.
- Django (www.djangoproject.com), , . ( Django):
{% if request.user.is_staff %} DISPLAY COOL DIV HERE {% else %} NOTHING TO SEE HERE {% endif %}
CSS. CSS .
CSS.
, JavaScript CSS , . , .
<style> #colorCode1{ color:blue; } <style> <script language=javascript type="text/javascript"> function setVisible( setting ){ var myElement = document.getElementById("colorCode1"); if(myElement.style.color=="blue"){ myElement.innerHTML = getPageContentForBlueCode(); } if(myElement.style.color=="red"){ myElement.innerHTML = getPageContentForRedCode(); } } </script>
- <div id="colorCode1">. JavaScript , CSS. , ,
<div id="colorCode1">
css, . ( "" ) , , , ( ). content css.
content
. .
, content, javascript, , , , iframe.