A sssing menu without jQuery?



  • Hello, everyone.

    Please tell me if you can do this. http://sitemaker.x10.bz/articles.php?id=10 using CSS?



  • You can do this. http://jsfiddle.net/shoorick/fSZQC/1/ net CSS3;-) For information, horizontal information can also be made: http://jsfiddle.net/shoorick/bp7QM/

    <div id="ave">
        <h2><a href="#ave">Ave verum</a></h2>
        <p>Ave verum corpus, natum de Maria Virgine, vere passum, immolatum in cruce pro homine,
        cuius latus perforatum unda fluxit et sanguine: esto nobis praegustatum in mortis examine.</p>
    </div>
    

    <div id="gaudeamus">
    <h2><a href="#gaudeamus">Gaudeamus</a></h2>
    <p>Gaudeamus igitur, Juvenes dum sumus!
    Post jucundam juventutem, Post molestam senectutem, Nos habebit humus!</p>
    </div>

    <div id="odi">
    <h2><a href="#odi">Odi et amo</a></h2>
    <p>Quare id faciam, fortasse requiris. Nescio, sed fieri sentio et excrucior.</p>
    </div>

    and

    body {
    font-family: "Liberation Sans",sans-serif;
    color: #000;
    background-color: #fff;
    }

    h2 {
    margin: 0;
    padding: 0;
    font-size: 111%;
    }

    div {
    background-color: #def;
    -moz-transition: background-color 1s;
    -ms-transition: background-color 1s;
    -o-transition: background-color 1s;
    -webkit-transition: background-color 1s;
    transition: background-color 1s;
    margin: 0;
    padding: 1em;
    border-top: 1px solid white;
    }

    div:target {
    background-color: #ff0;
    }

    div p {
    height: 0;
    margin: 0;
    color: #678;
    overflow: hidden;
    -moz-transition: height 1s, color 1s;
    -ms-transition: height 1s, color 1s;
    -o-transition: height 1s, color 1s;
    -webkit-transition: height 1s, color 1s;
    transition: height 1s, color 1s;

    }

    div:target p {
    height: 100px;
    color: maroon;
    }




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2