Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
649 views
in Technique[技术] by (71.8m points)

Convert css from html style tag into inline css

    <!doctype html>
    <html >
        <head>
            <style>

    .accordion section:target { background:#FFF; padding:10px;}
    .accordion section:target h2 a{ color:#333; padding:0;}
    .accordion section:target p {display:block;}
    .accordion section{ float:left; overflow:hidden; color:#333; cursor:pointer; background: #333; margin:3px; width:100%; height:40px; }
    .accordion section p { display:none; }
    .vertical :target{ height:250px; width:97%; }


    </style>

        </head>
        <body>
            <h1>CSS3 Only Accordion Examples</h1>


            <div style="width:830px; overflow:hidden; margin:10px auto; color:#474747; background:#414141; padding:10px;" class="accordion vertical">
              <section id="vertabout" target=" background:#FFF; padding:10px;">
                  <h2 style=" position:relative; left:0; top:-15px; "><a style="padding:8px 10px;display:block; font-size:16px; font-weight:normal;color:#eee; text-decoration:none;" href="#vertabout">About Us</a></h2>
                  <p>fggfdgasf</p>
              </section>
              <section id="vertservices">
                  <h2 style=" position:relative; left:0; top:-15px; "><a style="padding:8px 10px;display:block; font-size:16px; font-weight:normal;color:#eee; text-decoration:none;" href="#vertservices">Services</a></h2>
                  <p>dcsadsc</p>
              </section>
            </div>
        </body>
    </html>

How to convert the codes inside style tags into inline css? So that it can be send through email attachments as for proper viewing of the attachments only inline css are needed for email.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Zurb inliner does this. Have a look at http://zurb.com/ink/inliner.php


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...