Align Guitar Chords on Web

前端 未结 1 918
猫巷女王i
猫巷女王i 2020-12-21 11:43

I am trying to figure out a good way to display guitar chords on the web in a variable-width font, preferably using just HTML and CSS if possible. I\'m trying to do this by

1条回答
  •  失恋的感觉
    2020-12-21 12:16

    Why not simply relying on pseudo element and data attribute:

    p {
     margin-top:50px;
    }
    span.chunk {
     position:relative;
    }
    span.chunk:before {
      content:attr(data-chord);
      position:absolute;
      top:-15px;
    }

    As I was going over the far fam'd Kerry Mountains,

    0 讨论(0)
提交回复
热议问题