文章來源:http://www./2155.html <!DOCTYPE html> <html> <head> <title></title> <meta charset="utf-8"> <style type="text/css"> /* Vertically centered text with SVG */ div { width: 300px; height: 150px; background: #f06; font: bold 150% sans-serif; text-shadow: 0 1px 2px rgba(0,0,0,.5); overflow: hidden; resize: both; /* just for this demo */ color: white; } svg { width: 100%; height: 100%; pointer-events: none; /* so that you can resize the element */ } text { text-anchor: middle; pointer-events: auto; /* Cancel the svg’s pointer-events */ fill: currentColor; } p { font: italic 100% Georgia, serif; } </style> </head> <body> <p> 相信您一定是HTML5開發(fā)的忠實(shí)愛好者,,學(xué)習(xí)HTML5確實(shí)是一個(gè)很有遠(yuǎn)見的選擇 ,。HTML5的出現(xiàn),,必定會掀起web的新一波浪潮,甚至?xí)l(fā)一場互聯(lián)網(wǎng)革命,。HTML5漸漸走向成熟,,雖然目前還沒有形成統(tǒng)一標(biāo)準(zhǔn),但它的身影卻已隨處可見,。? </p> <div> <svg> <text x="50%" y="50%" dy=".3em"> Look, I’m centered! </text> </svg> </div> </body> </html>
|
|