Cut-out text with CSS

前端 未结 3 2069
花落未央
花落未央 2020-12-07 02:34

I try to create a hover effect for a button in CSS.
\"How

Basically text sho

3条回答
  •  春和景丽
    2020-12-07 03:12

    to follow my comment and links within , using svg , you can get this kind of things : http://codepen.io/gc-nomade/pen/Dqcio/

    svg {
      position:absolute;
      background:repeating-linear-gradient(-45deg,
        transparent,
        transparent 5px,
        black 5px,
        black 10px
        );
      width:600px;
      height:300px;
      box-sizing:border-box;
      background-clip: content-box; 
      padding:60px 70px;
    }
    text {
      font-size:8em;
      fill:url(#textpattern);
      stroke: white;
      border:solid;
      }
    div {
      position:relative;
      width:600px;
      margin:auto;
    }
    

    and markup :

        
    test

    With CSS , you can even add transparent borders and radius to make it look weirder http://codepen.io/gc-nomade/pen/wsfvg/

提交回复
热议问题