이미지 없이 라운딩 박스 + 보더 표현하기 입니다.

· 10년 전 · 557

<script>

function round(elm, bgcolor, border, mode) {
  var top = document.createElement('div'); top.style.cssText = 'height:5px';
  var bottom = document.createElement('div');bottom.style.cssText = 'height:5px';
  var temp = document.createElement('div'); temp.setAttribute('id', 'template');
  var border2 = (border) ? ";border-left:2px solid "+border+";border-right:2px solid "+border : "";
  var border1 = (border) ? ";border-left:1px solid "+border+";border-right:1px solid "+border : "";
  var bgcolor2 = (bgcolor) ? ";background:"+bgcolor : "";
  var bgcolor1 = (border) ? ";background:" + border : (bgcolor) ? ";background:" + bgcolor : "";

  var top_r = new Array(), bottom_r =new Array;
  var box = elm.cloneNode(true)
  for (i=1; i < 5 ;i++ )
  { top_r[i] = document.createElement('div')}

  top_r[1].style.cssText = 'margin:0px 5px;height:1px' + bgcolor1 ;
  top_r[2].style.cssText = 'margin:0px 3px;height:1px' + border2 + bgcolor2;
  top_r[3].style.cssText = 'margin:0px 2px;height:1px' + border1 + bgcolor2;
  top_r[4].style.cssText = 'margin:0px 1px;height:2px' + border1 + bgcolor2;

 
  for (i=1; i < 5 ;i++ ) {
    if (mode!='bottom') { top.appendChild(top_r[i]);temp.appendChild(top); }
    bottom_r[i] = top_r[i].cloneNode(true);
  }

  temp.appendChild(box);
  box.style.cssText =  border1 + bgcolor2;
  temp.appendChild(bottom);

  if (mode!='top') {
    for (i=4; i > 0 ;i-- ) {
      bottom.appendChild(bottom_r[i]);
    }
  }

  elm.parentNode.replaceChild(temp, elm);

}

</script>

|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
10년 전 조회 639
10년 전 조회 864
10년 전 조회 644
10년 전 조회 702
10년 전 조회 557
10년 전 조회 825
10년 전 조회 637
10년 전 조회 538
10년 전 조회 599
10년 전 조회 1,288
10년 전 조회 655
10년 전 조회 644
10년 전 조회 626
10년 전 조회 784
10년 전 조회 1,203
10년 전 조회 796
10년 전 조회 666
10년 전 조회 580
10년 전 조회 634
10년 전 조회 685
10년 전 조회 632
10년 전 조회 700
10년 전 조회 606
10년 전 조회 745
10년 전 조회 628
10년 전 조회 607
10년 전 조회 576
10년 전 조회 1,212
10년 전 조회 690
10년 전 조회 632
10년 전 조회 641
10년 전 조회 628
10년 전 조회 660
10년 전 조회 641
10년 전 조회 1,124
10년 전 조회 583
10년 전 조회 625
10년 전 조회 536
10년 전 조회 1,121
10년 전 조회 676
10년 전 조회 679
10년 전 조회 737
10년 전 조회 687
10년 전 조회 741
10년 전 조회 619
10년 전 조회 520
10년 전 조회 631
10년 전 조회 549
10년 전 조회 843
10년 전 조회 558
10년 전 조회 547
10년 전 조회 584
10년 전 조회 591
10년 전 조회 649
10년 전 조회 556
10년 전 조회 593
10년 전 조회 741
10년 전 조회 602
10년 전 조회 649
10년 전 조회 634
10년 전 조회 655
10년 전 조회 790
10년 전 조회 652
10년 전 조회 618
10년 전 조회 625
10년 전 조회 735
10년 전 조회 650
10년 전 조회 588
10년 전 조회 607
10년 전 조회 610
10년 전 조회 559
10년 전 조회 579
10년 전 조회 776
10년 전 조회 975
10년 전 조회 807
10년 전 조회 604
10년 전 조회 603
10년 전 조회 569
10년 전 조회 588
10년 전 조회 680
10년 전 조회 621
10년 전 조회 531
10년 전 조회 587
10년 전 조회 977
10년 전 조회 1,431
10년 전 조회 978
10년 전 조회 806
10년 전 조회 771
10년 전 조회 623
10년 전 조회 623
10년 전 조회 640
10년 전 조회 606
10년 전 조회 622
10년 전 조회 652
10년 전 조회 788
10년 전 조회 695
10년 전 조회 1,434
10년 전 조회 985
10년 전 조회 707
10년 전 조회 782