Autor |
Nachricht |
seal
Dabei seit: 31.07.2005
Ort: Pfalz
Alter: 41
Geschlecht:
|
Verfasst Sa 30.01.2010 16:13
Titel
|
|
|
Wäre es nicht sinnvoll, sich erstmal mit der CSS Syntax zu beschäftigen, bevor man mit der Umsetzung anfängt? Ohne deinen Code kann man zu dem Problem nichts sagen.
Der Punkt bedeutet, dass es eine CSS-Klasse ist, die im HTML mit class="zahl1" angesprochen wird.
Die Raute (#) wäre eine CSS-ID, die mit id="zahl1" angesprochen werden könnte. ID´s dürfen im Dokument nur einmal vorkommen, Klassen beliebig oft!
http://www.css4you.de/
|
|
|
|
|
a3e
Threadersteller
Dabei seit: 13.11.2009
Ort: -
Alter: 46
Geschlecht:
|
Verfasst Sa 30.01.2010 16:17
Titel
|
|
|
ups - peinlich - ich dachte das es javascript wäre und habe es ab <javascr...> reinkopiert - hier ein auszug:
<div style="text-align: center;">
<span id="c1" style="font: bold 30px arial; color: #000000;"></span><br />
</div>
<script type='text/javascript'>
.zahl1 {
text-indent: -999em; // blendet Text aus;
background: transparent url('images/zahlen/1.png') no-repeat;
}
var end = new Date('Februar 01, 2010 12:00:00');
function toSt2(n) {
var s = '';
if (n < 10) s += '0';
return (s + n).toString();
}
function toSt3(n) {
var s = '';
if (n < 10) s += '00';
else if (n < 100) s += '0';
return (s + n).toString();
}
function countdown() {
var d = new Date();
var count = Math.floor(end.getTime() - d.getTime());
if(count > 0) {
var miliseconds = toSt3(count%1000); count = Math.floor(count/1000);
var seconds = toSt2(count%60); count = Math.floor(count/60);
var minutes = toSt2(count%60); count = Math.floor(count/60);
var hours = toSt2(count%24); count = Math.floor(count/24);
var days = count;
document.getElementById('c1').innerHTML = days + ':' + hours + ':' + minutes + ':' + seconds
setTimeout('countdown()', 100);
}
}
countdown();
</script>
|
|
|
|
|
Anzeige
|
|
|
a3e
Threadersteller
Dabei seit: 13.11.2009
Ort: -
Alter: 46
Geschlecht:
|
Verfasst Sa 30.01.2010 19:01
Titel
|
|
|
ich hab jetzt soweit ich das verstanden habe an die richtigen stellen gemacht (bzw. wie ich denke das es sein müsste), aber es funzt dennoch nicht - was mache ich wo falsch
hier jetzt der komplette quelltext:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>......</title>
<style type="text/css">
body {
background-image:url(bilder/hintergrund/verlauf_03.png);}
#zahlen.zahl0 {
text-indent: -999em;
background: transparent url('bilder/zahlen/3_0.png') no-repeat;}
#zahlen.zahl1 {
text-indent: -999em;
background: transparent url('bilder/zahlen/3_1.png') no-repeat;}
#zahlen.zahl2 {
text-indent: -999em;
background: transparent url('bilder/zahlen/3_2.png') no-repeat;}
#zahlen.zahl3 {
text-indent: -999em;
background: transparent url('bilder/zahlen/3_3.png') no-repeat;}
#zahlen.zahl4 {
text-indent: -999em;
background: transparent url('bilder/zahlen/3_4.png') no-repeat;}
#zahlen.zahl5 {
text-indent: -999em;
background: transparent url('bilder/zahlen/3_5.png') no-repeat;}
#zahlen.zahl6 {
text-indent: -999em;
background: transparent url('bilder/zahlen/3_6.png') no-repeat;}
#zahlen.zahl7 {
text-indent: -999em;
background: transparent url('bilder/zahlen/3_7.png') no-repeat;}
#zahlen.zahl8 {
text-indent: -999em;
background: transparent url('bilder/zahlen/3_8.png') no-repeat;}
#zahlen.zahl9 {
text-indent: -999em;
background: transparent url('bilder/zahlen/3_9.png') no-repeat;}
</style>
</head>
<body bgcolor="#000000">
<img src="bilder/logo/bild_01.png" /><br /><br /><br />
<div style="text-align: center;">
<span id="zahlen"></span><br />
</div>
<script type='text/javascript'>
var end = new Date('Februar 01, 2010 12:00:00');
function toSt2(n) {
var s = '';
if (n < 10) s += '0';
return (s + n).toString();
}
function toSt3(n) {
var s = '';
if (n < 10) s += '00';
else if (n < 100) s += '0';
return (s + n).toString();
}
function countdown() {
var d = new Date();
var count = Math.floor(end.getTime() - d.getTime());
if(count > 0) {
var miliseconds = toSt3(count%1000); count = Math.floor(count/1000);
var seconds = toSt2(count%60); count = Math.floor(count/60);
var minutes = toSt2(count%60); count = Math.floor(count/60);
var hours = toSt2(count%24); count = Math.floor(count/24);
var days = count;
document.getElementById('zahlen').innerHTML = days + ':' + hours + ':' + minutes + ':' + seconds
setTimeout('countdown()', 100);
}
}
countdown();
</script>
</body>
</html>
|
|
|
|
|
|
|
|
Ähnliche Themen |
eigene App für Mobile erstellen
Eigene Scrollbar in Flash erstellen..
eigene Bilddatenbank erstellen, webfähig
Eigene Desktop Icons erstellen
Suchfeld für eigene HP in HTML erstellen...
Eigene User-History erstellen
|
|