Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
mfg MaikVielmehr müsstest du darin die benachbarten Elemente ausblenden, die nicht ausgedruckt werden sollen.
Das verstehe ich. Ich dachte vllt. hat jemand eine Idee. Wie man das sonst lösen kann.
<html>
<head>
<style>
.hide
{
display: none;
}
</style>
</head>
<body>
<p class="hide">Ich versteck mich,</p>
<p>ich bin sichtbar,</p>
<p class="hide">und ich bin nicht da!</p>
</body>
</html>
<html>
<head>
<title>drgrg</title>
<style type="text/css">
<!--
body * {display:none;}
body .test, body .test * {display:block;}
body .test span#g + span {display:none;}
-->
</style>
</head>
<body>
<span>hfgf</span>
<div class="test">
<span id="g">muh
<span>gh</span>
<span class="test">bla</span> <!-- Achtung: Ein <div> (=Block-Element) ist in einem <span> (=Inline-Element) nicht zulässig! -->
</span>
<span>fhg</span>
</div>
</body>
</html>
Kann es sein, dass du das Attribut "class" nicht kennst?
Ein (invalides) Beispiel:
HTML:<html> <head> <style> .hide { display: none; } </style> </head> <body> <p class="hide">Ich versteck mich,</p> <p>ich bin sichtbar,</p> <p class="hide">und ich bin nicht da!</p> </body> </html>
Die Elemente denen "hide" zugeordnet wurde sieht man nicht.
.hide * { display: block; }
.show { display: block; }
.hide *, .show { display: block; }
<html>
<head>
<style>
.hide
{
display: none;
}
.hide *, .show { display: block; }
</style>
</head>
<body>
<p class="hide">Ich versteck mich, <span class="show">und ich nicht, wenn ich denn könnte.</span></p>
<p>ich bin sichtbar,</p>
<p class="hide">und ich bin nicht da!</p>
</body>
</html>
<html>
<head>
<title>drgrg</title>
<style type="text/css">
<!--
body * { display:none; }
.test { display:block; }
.test * { display: none; }
#g { display:block !important; }
#g * { display:block !important; }
-->
</style>
</head>
<body>
<span>Ich versteck mich</span>
<div class="test">
<span id="g">Juhuu ich werde gedruckt
<span> - wunderbar</span>
<div class="test">Ich bin auch auf dem Druck!</div>
</span>
<span>Immer die Diskrimierung der nicht g-SubTags</span>
</div>
</body>
</html>