<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <Html xmlns = "http://www.w3.org/1999/xhtml"> <Head> <Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/> <Link href = "../style.css" rel = "stylesheet" type = "text/css"/>
<Style> . Rating { Float: left; Width: 180px; Background-image: url (images/poll-bottom.png ); Background-position: bottom left; Background-repeat: no-repeat; Padding-bottom: 40px; } . Graph { Float: left; Margin-top: 10px; Position: relative; Height: pixel PX; Padding: 0; } . Graph. bar1,. graph. bar2,. graph. bar3 { Display: block; Position: absolute; Background-image: url (images/poll-body.png ); Background-position: top left; Color: # fff; Width: 159px; Min-height: 70px; Font-family: Arial, Helvetica, sans-serif; Font-size: 12px; Line-height: 1.9em; Bottom: 0; } . Graph. bar1 span,. graph. bar2 span,. graph. bar3 span { Position: absolute; Left: 50px; Top: 20px; Font-size: 33px; Color: #333; Text-shadow: 0 1px # fff; } . Ans { Text-align: center ;} </Style> <Script type = "text/javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js"> </script> <Script type = "text/javascript"> $ (Document). ready (function (){ $ ('. Bar1'). animate ({'height': '000000'}, 22% ); $ ('. Bar2'). animate ({'height': '000000'}, 58% ); $ ('. Bar3'). animate ({'height': '20180101'}, 20% ); }); </Script>
</Head> <Body> <Div class = "polls"> <Div class = "rating"> <Div class = "graph"> <Strong class = "bar1"> <Span> 22% </span> </Strong> </Div> <Div class = "ans"> Answer 1 </div> </Div>
<Div class = "rating"> <Div class = "graph"> <Strong class = "bar2"> <Span> 58% </span> </Strong> </Div>
<Div class = "ans"> Answer 2 </div> </Div> <Div class = "rating"> <Div class = "graph"> <Strong class = "bar3"> <Span> 20% </span> </Strong> </Div>
<Div class = "ans"> Answer 3 </div> </Div> <Div class = "clear"> </div>
</Div> </Body> </Html>
|