久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

記錄一個(gè)svg中text垂直水平居中的解決辦法

 復(fù)雜網(wǎng)絡(luò)621 2017-08-29
文章來源: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>

    本站是提供個(gè)人知識管理的網(wǎng)絡(luò)存儲空間,,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn),。請注意甄別內(nèi)容中的聯(lián)系方式,、誘導(dǎo)購買等信息,謹(jǐn)防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,,請點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多