Schriftfarbe &nd Bg ändern

Dieses Thema im Forum "Webentwicklung" wurde erstellt von romestylez, 15. Juli 2008 .

Schlagworte:
Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 15. Juli 2008
    Hi jungs,
    hab dieses "Script" auf meinem Pc wieder gefunden und wollte mal fragen wie ich nen schwarzen BG reinbekomme und so Matrxi Grüne Schrift ?

    Jalt so leuchtendes Grün...


    Hab bissel rumprobiert aber hab da net so den Plan auf dem Gebit :X

    Bw is sicher
     
  2. 15. Juli 2008
    AW: Schriftfarbe &nd Bg ändern

    HTML:
    <html>
    <head>
    <title>Schrift</title>
    
    <meta name="author" content="Quaese" />
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript">
    <!--
    var strHallo = "HALLO!";
    var aktiv = null;
    var i = 0, text = 1;
    
    function Typing (){
    document.getElementById("outID").innerHTML += strHallo.substr(i, 1);
    
    if (i++ >= 6)
    window.clearInterval(aktiv);
    }
    
    window.onload = function(){
    aktiv = window.setInterval("Typing()", 500);
    }
    //-->
    </script>
    
    <style type="text/css">
     .matrix
     {
     background-color:#000000;
     color:#00ff00;
     }
    </style>
    
    </head>
    <body class="matrix">
    <div class="matrix" id="outID"></div>
    </font>
    </body>
    </html>
     
  3. 15. Juli 2008
    AW: Schriftfarbe &nd Bg ändern



    Thx

    Bw is raus

    Gibs vllt noch die Möglichkeit nen Bg Bild reinzutun ? Weil wenn ich das mache is der Obereteil des Bildes nochmal oben am Pagerand wo die Schrift kommt Da wäre mir ne weisse Box ganz lieb ^^


    Oder das man einfach direkt aufm Bild schreibt
     
  4. 16. Juli 2008
    AW: Schriftfarbe &nd Bg ändern

    guck dir dazu dass hier mal an:
    http://www.css3.com/css-background-image/ und
    http://www.css3.com/css-background-repeat/

    greez myth
     
  5. 16. Juli 2008
    Zuletzt von einem Moderator bearbeitet: 14. April 2017
    AW: Schriftfarbe &nd Bg ändern

    Ich weiss schon wie man das einsetzt also den Code kenne ich aber es geht net ^^

    Und so funktioniert es leider net
     
  6. 16. Juli 2008
    Zuletzt von einem Moderator bearbeitet: 14. April 2017
    AW: Schriftfarbe &nd Bg ändern

    Du kannst in einem JavaScript-Block auch keine Styles definieren.

    JavaScript:

    Code:
    <[COLOR="Red"]script[/COLOR] type="text/[COLOR="Red"]javascript[/COLOR]">
     ...
    </script>
    CSS:

    Code:
    <[COLOR="Red"]style [/COLOR]type="text/[COLOR="Red"]css[/COLOR]">
     ...
    </style>
    Also muss es in deinem Fall so aussehen:


    Code:
    <style type="text/css">
    .matrix
    {
     background-color:#000000;
     color:#00ff00;
    }
    
    body
    {
     background-image: url(https://www.xup.in/dl,31869937/change.jpg.com);
     background-color: #000000;
    }
    </style>
    Damit das Hintergrundbild nur einmal auftaucht, kannst du noch "background-repeat: no-repeat;" definieren:

    Code:
    <style type="text/css">
    .matrix
    {
     background-color:#000000;
     color:#00ff00;
    }
    
    body
    {
     background-image: url(https://www.xup.in/dl,31869937/change.jpg.com);
     background-color: #000000;
     background-repeat:no-repeat;
    }
    </style>
    Das Semikolon am Schluss der Style-Definitionen nicht vergessen!

    Das heißt also, dass das Ergebnis so aussieht:

    Code:
    <html>
    <head>
    <title>Schrift</title>
    
    <meta name="author" content="Quaese" />
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript">
    <!--
    var strHallo = "HALLO!";
    var aktiv = null;
    var i = 0, text = 1;
    
    function Typing (){
    document.getElementById("outID").innerHTML += strHallo.substr(i, 1);
    
    if (i++ >= 6)
    window.clearInterval(aktiv);
    }
    
    window.onload = function(){
    aktiv = window.setInterval("Typing()", 500);
    }
    //-->
    </script>
    
    <style type="text/css">
    .matrix
    {
     background-color:#000000;
     color:#00ff00;
    }
    
    .matrix
    {
     background-color:#000000;
     color:#00ff00;
    }
    
    body
    {
     background-image: url(https://www.xup.in/pic,31869937/change.jpg);
     background-color: #000000;
     background-repeat:no-repeat;
    }
    </style>
    
    </head>
    <body class="matrix">
    <div class="matrix" id="outID"></div>
    </font>
    </body>
    </html>
    Hab den Pfad vom Bild angepasst, damit es angezeigt wird :]
     
  7. 16. Juli 2008
    AW: Schriftfarbe &nd Bg ändern

    probier das mal:
    HTML:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
     <head> 
     <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" /> 
     <title>Test</title> 
     <script type="text/javascript">
     /* <![CDATA[ */
     function JSTypedText(str, element, speed) { 
     this.str = str;
     this.speed = (!speed || isNaN(speed) || speed < 100) ? 100 : speed;
     this.element = (element.nodeName) ? element : document.getElementById(element);
     if(!this.element) alert('Element nicht gefunded!\nMögliche Ursachen:\n-Element existiert '
     + 'nicht\n-Element ist noch nicht geladen (onload)\n-Gschmarre '
     + 'als ID angegeben ([A-Za-z_]{1}[A-Za-z0-9_-]+)');
     else this.start();
     }
     
     JSTypedText.prototype = {
     val: null,
     next: 0,
     start: function() {
     if(this.val != null)
     this.stop();
     
     var _this = this;
     this.val = window.setInterval(function() { _this.step(); }, this.speed);
     },
     
     stop: function() {
     window.clearInterval(this.val);
     this.val = null;
     },
     
     step: function() {
     if(this.next == this.str.length) {
     this.stop();
     return;
     }
     
     var val = this.element.innerHTML;
     val += this.str.charAt(this.next++);
     this.element.innerHTML = val;
     }
     }
     
     window.onload = function() {
     var m = new JSTypedText('hallo welt!', 'test');
     }
     /* ]]> */
     </script>
     </head> 
     <body> 
     <span id="test"></span> 
     </body> 
    </html>
    hintergrundfarbe kannst via .style.backgroundColor ändern
     
  8. 16. Juli 2008
    AW: Schriftfarbe &nd Bg ändern


    Was is los ?! Da steig ich mal garnimmer durch -_-

    Wo is der Text "Hallo" damit ich den ändern kann ?
    Wo wird die Schrift/Backgroundfarbe angegeben ?
    Wo is der Pfad zum Pic ?


    Danke für deine Hilfe aber is mega unübersichtlich geworden zumindest für mich new b auf dem Gebiet...


    // EDIT

    Erst jetzt den Post von Gibbon gesehen der machts perfekt

    Thx Bw hattest schon Rest auch thx


    ~> Closed
     
  9. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.