mediengestalter.info
FAQ :: Mitgliederliste :: MGi Team

Willkommen auf dem Portal für Mediengestalter

Aktuelles Datum und Uhrzeit: Fr 26.04.2024 09:25 Benutzername: Passwort: Auto-Login

Thema: Eigene Zahlen erstellen und verwenden (lassen) vom 26.01.2010


Neues Thema eröffnen   Neue Antwort erstellen MGi Foren-Übersicht -> Allgemeines - Nonprint -> Eigene Zahlen erstellen und verwenden (lassen)
Seite: Zurück  1, 2
Autor Nachricht
seal

Dabei seit: 31.07.2005
Ort: Pfalz
Alter: 41
Geschlecht: Männlich
Verfasst Sa 30.01.2010 16:13
Titel

Antworten mit Zitat Zum Seitenanfang

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/
  View user's profile Private Nachricht senden
a3e
Threadersteller

Dabei seit: 13.11.2009
Ort: -
Alter: 46
Geschlecht: Männlich
Verfasst Sa 30.01.2010 16:17
Titel

Antworten mit Zitat Zum Seitenanfang

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>
  View user's profile Private Nachricht senden
Anzeige
Anzeige
a3e
Threadersteller

Dabei seit: 13.11.2009
Ort: -
Alter: 46
Geschlecht: Männlich
Verfasst Sa 30.01.2010 19:01
Titel

Antworten mit Zitat Zum Seitenanfang

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 *hu hu huu*

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>
  View user's profile Private Nachricht senden
 
Ä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
Neues Thema eröffnen   Neue Antwort erstellen Seite: Zurück  1, 2
MGi Foren-Übersicht -> Allgemeines - Nonprint


Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst an Umfragen in diesem Forum nicht mitmachen.