HTML كود العين الساحرة في منتصف منتداك

View previous topic View next topic Go down

HTML كود العين الساحرة في منتصف منتداك

Post by Admin on Wed Mar 11, 2015 11:54 am

Admin wrote:
اعزائي اعضاء وزوارمنتدى الدعم والمساعدة اهلا ومرحبا بكم

اليوم اقدم لكم كود جديد


كود العين الساحرة في منتصف منتداك






Code:
</center>[size=14][/size] <script type="text/javascript">[size=14][/size]// <![CDATA[[size=14][/size]var width=66; // width of the eyes in pixels[size=14][/size]var colour="#ffffcc"; // colour of the eye - bluey green in this case[size=14][/size]var iris="#003322"; //   colour of the iris (normally black);[size=14][/size][size=14][/size]/***************************\[size=14][/size]*   العين الساحرة  *[size=14][/size]*(c)2012-3 hamsahq web-design *[size=14][/size]*  http://hamsahq.123.st/  *[size=14][/size]* DON'T EDIT BELOW THIS BOX *[size=14][/size]\***************************/[size=14][/size]var swide=500;[size=14][/size]var shigh=300;[size=14][/size]var sleft=sdown=0;[size=14][/size][size=14][/size]var glasses, lefteye, righteye;[size=14][/size][size=14][/size]function addLoadEvent(funky) {[size=14][/size]  var oldonload=window.onload;[size=14][/size]  if (typeof(oldonload)!='function') window.onload=funky;[size=14][/size]  else window.onload=function() {[size=14][/size]    if (oldonload) oldonload();[size=14][/size]    funky();[size=14][/size]  }[size=14][/size]}[size=14][/size][size=14][/size]addLoadEvent(draw_eyes);[size=14][/size][size=14][/size]function draw_eyes() {[size=14][/size]  var i, j, l, m;[size=14][/size]  glasses=document.createElement("div");[size=14][/size]  i=glasses.style;[size=14][/size]  i.position="fixed";[size=14][/size]  i.top="50%";[size=14][/size]  i.left="50%";[size=14][/size]  i.width="1px";[size=14][/size]  i.height="1px";[size=14][/size]  i.overflow="visible";[size=14][/size]  i.zIndex="100";[size=14][/size]  document.body.appendChild(glasses);[size=14][/size]  lefteye=document.createElement("div");[size=14][/size]  righteye=document.createElement("div");[size=14][/size]  i=lefteye.style;[size=14][/size]  j=righteye.style;[size=14][/size]  i.position=j.position="absolute";[size=14][/size]  i.width=j.width="1px";[size=14][/size]  i.height=j.height="1px";[size=14][/size]  i.overflow=j.overflow="visible";[size=14][/size]  i.zIndex=j.zIndex="101";[size=14][/size]  glasses.appendChild(lefteye);[size=14][/size]  glasses.appendChild(righteye);[size=14][/size]  for (m=-1.1; m<2; m+=2.2) for (i=-width; i<width; i++) {[size=14][/size]    l=Math.pow(width*width-i*i, 0.5);[size=14][/size]    j=line(m*width-l, i, 2*l, colour, 0.5);[size=14][/size]   glasses.appendChild(j);[size=14][/size]  }  [size=14][/size]  for (i=-width/2; i<width/2; i++) {[size=14][/size]    l=Math.pow(width*width/4-i*i, 0.5);[size=14][/size]    j=line(-1.1*width-l, i, 2*l, iris, 0.8);[size=14][/size]   lefteye.appendChild(j);[size=14][/size]  }[size=14][/size]  for (i=-width/2; i<width/2; i++) {[size=14][/size]    l=Math.pow(width*width/4-i*i, 0.5);[size=14][/size]    j=line(1.1*width-l, i, 2*l, iris, 0.8);[size=14][/size]   righteye.appendChild(j);[size=14][/size]  }[size=14][/size]  set_width();[size=14][/size]  set_scroll();[size=14][/size]}[size=14][/size][size=14][/size]function line(left, top, width, colour, opacity) {[size=14][/size]  var d, s;[size=14][/size]  d=document.createElement("div");[size=14][/size]  s=d.style;[size=14][/size]  s.position="absolute";[size=14][/size]  s.height="1px";[size=14][/size]  s.width=width+"px";[size=14][/size]  s.left=left+"px";[size=14][/size]  s.top=top+"px";[size=14][/size]  s.overflow="hidden";[size=14][/size]  s.backgroundColor=colour;[size=14][/size]  s.pointerEvents="none";[size=14][/size]  s.opacity=opacity;[size=14][/size]  if (navigator.appName=="Microsoft Internet Explorer") s.filter="alpha(opacity="+(opacity*100)+")";[size=14][/size]  return d;[size=14][/size]}[size=14][/size][size=14][/size]document.onmousemove=mouse;[size=14][/size]function mouse(e) {[size=14][/size]  var x, y, xdiff, ydiff, distn;[size=14][/size][size=14][/size]  y=(e)?e.pageY:event.y;[size=14][/size]  x=(e)?e.pageX:event.x;[size=14][/size]  x-=sleft;[size=14][/size]  y-=sdown;[size=14][/size][size=14][/size]  xdiff=x+(1.1*width)-(swide*0.5);[size=14][/size]  ydiff=y-shigh/2;[size=14][/size]  distn=Math.pow(xdiff*xdiff+ydiff*ydiff,0.5);[size=14][/size]  if (distn>width/2.5) {[size=14][/size]    xdiff=xdiff*width/distn/2.5;[size=14][/size]    ydiff=ydiff*width/distn/2.5;[size=14][/size]  }[size=14][/size]  lefteye.style.top=ydiff+"px";[size=14][/size]  lefteye.style.left=xdiff+"px";[size=14][/size][size=14][/size]  xdiff=x-(1.1*width)-(swide*0.5);[size=14][/size]  ydiff=y-shigh/2;[size=14][/size]  distn=Math.pow(xdiff*xdiff+ydiff*ydiff,0.5);[size=14][/size]  if (distn>width/2.5) {[size=14][/size]    xdiff=xdiff*width/distn/2.5;[size=14][/size]    ydiff=ydiff*width/distn/2.5;[size=14][/size]  }[size=14][/size]  righteye.style.top=ydiff+"px";[size=14][/size]  righteye.style.left=xdiff+"px";[size=14][/size]}[size=14][/size][size=14][/size]document.onscroll=set_scroll;[size=14][/size]function set_scroll() {[size=14][/size]  if (typeof(self.pageYOffset)=="number") {[size=14][/size]    sdown=self.pageYOffset;[size=14][/size]    sleft=self.pageXOffset;[size=14][/size]  }[size=14][/size]  else if (document.body.scrollTop || document.body.scrollLeft) {[size=14][/size]    sdown=document.body.scrollTop;[size=14][/size]    sleft=document.body.scrollLeft;[size=14][/size]  }[size=14][/size]  else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {[size=14][/size]    sleft=document.documentElement.scrollLeft;[size=14][/size]   sdown=document.documentElement.scrollTop;[size=14][/size]  }[size=14][/size]  else {[size=14][/size]    sdown=0;[size=14][/size]    sleft=0;[size=14][/size]  }[size=14][/size]}[size=14][/size][size=14][/size]window.onresize=set_width;[size=14][/size]function set_width() {[size=14][/size]  var sw_min=997744;[size=14][/size]  var sh_min=997744;[size=14][/size]  if (document.documentElement && document.documentElement.clientWidth) {[size=14][/size]    if (document.documentElement.clientWidth>0) sw_min=document.documentElement.clientWidth;[size=14][/size]    if (document.documentElement.clientHeight>0) sh_min=document.documentElement.clientHeight;[size=14][/size]  }[size=14][/size]  if (typeof(self.innerWidth)!="undefined" && self.innerWidth) {[size=14][/size]    if (self.innerWidth>0 && self.innerWidth<sw_min) sw_min=self.innerWidth;[size=14][/size]    if (self.innerHeight>0 && self.innerHeight<sh_min) sh_min=self.innerHeight;[size=14][/size]  }[size=14][/size]  if (document.body.clientWidth) {[size=14][/size]    if (document.body.clientWidth>0 && document.body.clientWidth<sw_min) sw_min=document.body.clientWidth;[size=14][/size]    if (document.body.clientHeight>0 && document.body.clientHeight<sh_min) sh_min=document.body.clientHeight;[size=14][/size]  }[size=14][/size]  if (sw_min==997744 || sh_min==997744) {[size=14][/size]    sw_min=800;[size=14][/size]    sh_min=600;[size=14][/size]  }[size=14][/size]  swide=sw_min;[size=14][/size]  shigh=sh_min;[size=14][/size]}[size=14][/size]// ]]>[size=14][/size]</script>


والان طريقة وضع الكود في الموقع


نذهب الى لوحة الادارة


مظهر المنتدى


تشكيلات عامة


وضع اعلان في الصفحة الريئسية


ونضغط على قدم

ويمكنك التحكم بالون  

Code:
#ffffcc


Code:
#003322


Code:
var colour="#ffffcc"; // colour of the eye - bluey green in this case[size=14][/size]var iris="#003322"; //   colour of the iris (normally black);
ويمكنك  التحكم  بتصغير او تكبير العين  من هذا الكود

Code:
var swide=500;[size=14][/size]var shigh=300;[size=14][/size]var sleft=sdown=0;[size=14][/size]






ملاحظة  يسمح بنقل الكود مع ذكر المصدر
منتدى الدعم والمساعدة
اختكم بالله همسة حق
HAMSAHAQ

Admin
Admin

Time Online : 14d 23h 8m 17s
Posts : 21
Join date : 2014-11-15

View user profile http://haq1.123.st

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum