html - Show timestamps to CSS version of iMessages Interface -
i'm creating imessages view of data showing outgoing , incoming messages - found nice css solution here:
http://cssdeck.com/labs/6mifhkdc
one missing part need ability show timestamps when messages sent/received - in imessages when swipe message left. have timestamps stored , ready display, need guidance on css use make them appear in imessages.
(the timestamps appear permanently on page - no swiping involved)
i'm newbie @ css not sure start add type of attribute.
here's sample of how page looks:
<!doctype html> <html lang="en"> <head> <title>fmsms chat thread</title> <style type="text/css"> /* bit of normalisation */ /* inspired by: http://cssdeck.com/labs/6mifhkdc */ body { background-color: #eee; color: #222; font: 0.8125em/1.5 'helvetica neue', helvetica, arial, sans-serif; } img { display: block; height: auto; max-width: 100%; } .container { padding: 40px 20px; margin: 0 auto; width: 400px; } /* .bubble */ .bubble { background-image: linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%); background-image: -o-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%); background-image: -moz-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%); background-image: -webkit-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%); background-image: -ms-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%); background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0.25, rgb(210,244,254)), color-stop(1, rgb(149,194,253)) ); border: solid 1px rgba(0, 0, 0, 0.5); /* vendor rules */ border-radius: 20px; /* vendor rules */ box-shadow: inset 0 5px 5px rgba(255, 255, 255, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2); /* vendor rules */ box-sizing: border-box; clear: both; float: left; margin-bottom: 20px; padding: 8px 30px; position: relative; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); width: auto; max-width: 100%; word-wrap: break-word; } .bubble:before, .bubble:after { border-radius: 20px / 10px; content: ''; display: block; position: absolute; } .bubble:before { border: 10px solid transparent; border-bottom-color: rgba(0, 0, 0, 0.5); bottom: 0; left: -7px; z-index: -2; } .bubble:after { border: 8px solid transparent; border-bottom-color: #d2f4fe; bottom: 1px; left: -5px; } .bubble--green { background-image: linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%); background-image: -o-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%); background-image: -moz-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%); background-image: -webkit-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%); background-image: -ms-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%); background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0.25, rgb(172,228,75)), color-stop(1, rgb(122,205,71)) ); float: right; } .bubble--green:before { border-bottom-color: rgba(0, 0, 0, 0.5); border-radius: 20px / 10px; left: auto; right: -7px; } .bubble--green:after { border-bottom-color: #ace44b; border-radius: 20px / 10px; left: auto; right: -5px; } </style> </head> <body> <div class="container"> <div class="bubble"> sample outgoing message </div> <div class="bubble bubble--green"> here's first reply </div> <div class="bubble"> here's next sent message </div> <div class="bubble bubble--green"> , final reply </div> </div> </body> </html>
you can not use css add timestamps. generate timestamp javascript or api , add dom.
Comments
Post a Comment