Social Icons

Saturday, 2 February 2013

Beautiful HTML Codes ( 1 )















               ညီမလည္း.. posts ေတြတင္တာ..အစံုပဲ..။ တစ္ခ်ိဳ႔ကေၿပာတယ္..အားလံုးေရာေနတယ္တဲ့..။ တစ္ခုတည္းသြားလုိ႔ေၿပာၾကတယ္..။ ညီမစဥ္းစားၾကည့္တယ္..တစ္ခုတည္းသြားမယ္ဆိုရင္.. HTML ပဲသင္မယ္ထားဦး..။ တစ္ခ်ဳိ႔က.. HTML ေလ့လာခ်င္တာမဟုတ္ဘူးေလ..။ C# တို႔... VB တုိ႔ေလ့လာခ်င္တာ..။ တစ္မ်ိဳးတည္းပဲ.. posts တင္မယ္ဆိုရင္...ပ်င္းသြားၾကမွာစိုးလို႔..။ အမ်ိဳးမ်ိဳးေၿပာင္းတင္ေနတာပါ..  :)
               ဒီတစ္ခါေတာ့.. HTML code မ်ားထဲမွ.. လွပတဲ့.. code ေတြအေၾကာင္းတင္ေပးမွာပါ...။ အဲ့ဒါမေၿပာခင္..အရင္ဆံုး.. HTML ဘယ္လိုေရးလဲ..အၾကမ္းဖ်င္းေၿပာမယ္ေနာ္... ^_^


HTML ကုိ..ဒီလိုမ်ိဳးပံုစံနဲ႔ေရးပါတယ္..။
<html>
<head>
<title> Your title </title>
<script>// javascript code သံုးရင္..ထည့္ရမည္

JavaScript code

</script>// javascript code သံုးရင္..ထည့္ရမည္

</head>
<body>

Paragraphs and photos that you want to tell.

</body>
</html>

           ဒါကေတာ့.. HTML ပံုစံေလးပါ..။ ဒီအတိုင္းေရးရပါတယ္.။ Website ရဲ႔ Background အေရာင္ကုိ.. dancing color ေလးထားလိုက္ရေအာင္ေနာ္.. ။ Dancing color ဆိုတာက..အေရာင္ေတြက..တသတ္မွတ္တည္းမဟုတ္ပဲ...ၾကည့္ေနရင္း...ေၿပာင္းေၿပာင္းသြားတာပါ...။
ေအာက္က.. Code ေလးကုိ.. copy ကူးၿပီး.. notepad ထဲမွာ.. bgcolor.html ဆိုၿပီး.. save လိုက္ပါ..။
ၿပီးရင္ save လုပ္ထားတဲ့.. file ကုိ..double click ႏွိပ္ၿပီး.. ဖြင့္ၾကည့္လိုက္ပါ...။ သူငယ္ခ်င္းတို႔.. website ထဲမွာလည္း.. code ကုိေရာသံုးလို႔ရပါတယ္... ^_^

<html>
<head>
<script>

var fade_effect=3


var gradient_effect="horizontal"


var speed=60

var browserinfos=navigator.userAgent
var ie4=document.all&&!document.getElementById
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/) 
var browserok=ie4||ie5||ns4||ns6||opera

if (fade_effect==1) {
    var darkmax=1
    var lightmax=127
}
if (fade_effect==2) {
    var darkmax=127
    var lightmax=254
}
if (fade_effect==3) {
    var darkmax=1
    var lightmax=254
}
if (fade_effect==4) {
    var darkmax=190
    var lightmax=254
}
if (fade_effect==5) {
    var darkmax=1
    var lightmax=80
}
var hexc = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F')

var newred
var newgreen
var newblue
var oldred
var oldgreen
var oldblue

var redcol_1
var redcol_2
var greencol_1
var greencol_2
var bluecol_1
var bluecol_2
var oldcolor
var newcolor
var firsttime=true

var stepred=1
var stepgreen=1
var stepblue=1

function setrandomcolor() {
    var range=(lightmax-darkmax)
    if (firsttime) {
        newred=Math.ceil(range*Math.random())+darkmax
        newgreen=Math.ceil(range*Math.random())+darkmax
        newblue=Math.ceil(range*Math.random())+darkmax
        firsttime=false
    }
   
    oldred=Math.ceil(range*Math.random())+darkmax
    oldgreen=Math.ceil(range*Math.random())+darkmax
    oldblue=Math.ceil(range*Math.random())+darkmax
   
    stepred=newred-oldred
    if (oldred>newred) {stepred=1}
    else if (oldred<newred) {stepred=-1}
    else {stepred=0}
   
    stepgreen=newgreen-oldgreen
    if (oldgreen>newgreen) {stepgreen=1}
    else if (oldgreen<newgreen) {stepgreen=-1}
    else {stepgreen=0}
   
    stepblue=newblue-oldblue
    if (oldblue>newblue) {stepblue=1}
    else if (oldblue<newblue) {stepblue=-1}
    else {stepblue=0}
    fadebg()
}

function fadebg() {
    if (newred==oldred) {stepred=0}
    if (newgreen==oldgreen) {stepgreen=0}
    if (newblue==oldblue) {stepblue=0}
    newred+=stepred
    newgreen+=stepgreen
    newblue+=stepblue
   
    if (stepred!=0 || stepgreen!=0 || stepblue!=0) {
          redcol_1 = hexc[Math.floor(newred/16)];
         redcol_2 = hexc[newred%16];
         greencol_1 = hexc[Math.floor(newgreen/16)];
          greencol_2 = hexc[newgreen%16];
          bluecol_1 = hexc[Math.floor(newblue/16)];
          bluecol_2 = hexc[newblue%16];
          newcolor="#"+redcol_1+redcol_2+greencol_1+greencol_2+bluecol_1+bluecol_2
        if (ie5 && gradient_effect!="none") {
            if (gradient_effect=="horizontal") {gradient_effect=1}
            if (gradient_effect=="vertical") {gradient_effect=0}
              greencol_1 = hexc[Math.floor(newred/16)];
             greencol_2 = hexc[newred%16];
             bluecol_1 = hexc[Math.floor(newgreen/16)];
              bluecol_2 = hexc[newgreen%16];
              redcol_1 = hexc[Math.floor(newblue/16)];
              redcol_2 = hexc[newblue%16];
            var newcolorCompl="#"+redcol_1+redcol_2+greencol_1+greencol_2+bluecol_1+bluecol_2
            document.body.style.filter=
"progid:DXImageTransform.Microsoft.Gradient(startColorstr="+newcolorCompl+", endColorstr="+newcolor+" GradientType="+gradient_effect+")"
        }
        else {
              document.bgColor=newcolor
        }
        var timer=setTimeout("fadebg()",speed);
    }
      else {
          clearTimeout(timer)
        newred=oldred
        newgreen=oldgreen
        newblue=oldblue
        oldcolor=newcolor
        setrandomcolor()
      }
}

if (browserok) {
    window.onload=setrandomcolor
}
</script>
</head>
<body>
</body>
</html>


beautiful html code ေတြတင္ရတဲ့.. ရည္ရြယ္ခ်က္ကေတာ့..တခ်ိဳ႔အေရးတၾကီးလိုတဲ့အခါ...အၿမန္ဆံုးသံုးႏိုင္ေအာင္လုိ႔ပါ..

0 comments:

Post a Comment

 

Sample text

Sample Text

Sample Text