CSS3 family tree, how to add wife

后端 未结 5 2027
忘掉有多难
忘掉有多难 2021-02-06 13:19

I\'m following this guide on how to make a family tree using only CSS3. But I can\'t really get my head around how to make a marriage.

To clarify: What the codes does no

5条回答
  •  执念已碎
    2021-02-06 13:56

    Here's the approach I took

    • Father
    • Mother
    James CLARKE1779 - 1860
    1. Child
    2. Child
    3. Child
  • then any

  • throughout the tree can repeat like that (though if you add children AND parents to all of them you'd get a mess... generally just add one or the other once you get past the "core" person in that view.

    Real example is on http://www.clarkeology.com with annotated css at /css/_tree.css and the code I wrote to parse a GEDCOM file and create the necessary html is at https://github.com/pauly/js-gedcom

    I used itemprop instead of class above as I'm actually adding schema.org microformats to all mine too, but class would work just fine.

    I really enjoyed the original css when I found it the other day, this has been fun to work on. Pull requests welcome on my code!

提交回复
热议问题