当前位置:首页 > Web开发 > 正文

text-shadow: 水平偏移 垂直偏移 模糊 颜色 兼容性:IE10+ ! DOCTYPE html html

2024-03-31 Web开发

text-shadow: 程度偏移 垂直偏移  模糊 颜色

兼容性:IE10+

<!DOCTYPE html> <html lang="en" manifest="index.manifest"> <head> <meta charset="UTF-8"> <title>Document</title> <style> p{ color:blue; text-shadow: 3px 3px 3px black; } </style> </head> <body> <p>这是一段测试文本鸭</p> </body> </html>

css3 换行

word-break: normal | break-all | keep-all

对付英文文本:normal 和 keep-all 效果不异;break-all 即字母和字母见换行,不考虑单词的影响

对付中文文本:normal 和 break-all 效果不异;keep-all 即按照标点标记换行

<!DOCTYPE html> <html lang="en" manifest="index.manifest"> <head> <meta charset="UTF-8"> <title>Document</title> <style> p{width:500px;} span{background:#abcdef;} p:nth-child(1){word-break:normal;} p:nth-child(2){word-break:break-all;} p:nth-child(3){word-break:keep-all;} p:nth-child(5){word-break:normal;} p:nth-child(6){word-break:break-all;} p:nth-child(7){word-break:keep-all;} </style> </head> <body> <p><span>[word-break:normal]</span> I have a dream that one day on the red hills of Georgia, the sons of former slaves and the sons of former slave owners will be able to sit down together at the table of brotherhood.</p> <p><span>[word-break:break-all]</span> I have a dream that one day on the red hills of Georgia, the sons of former slaves and the sons of former slave owners will be able to sit down together at the table of brotherhood.</p> <p><span>[word-break:keep-all]</span> I have a dream that one day on the red hills of Georgia, the sons of former slaves and the sons of former slave owners will be able to sit down together at the table of brotherhood.</p> <hr> <p><span>[word-break:normal]</span> 我梦想有一天,这个国家会站立起来,真正实现其信条的真谛:“我们认为人人生而平等的真理不言而喻。”我梦想有一天,在佐治亚的红山上,畴前奴隶的后嗣将能够和奴隶主的后嗣坐在一起,共叙兄弟情谊。</p> <p><span>[word-break:break-all]</span> 我梦想有一天,这个国家会站立起来,真正实现其信条的真谛:“我们认为人人生而平等的真理不言而喻。”我梦想有一天,在佐治亚的红山上,畴前奴隶的后嗣将能够和奴隶主的后嗣坐在一起,共叙兄弟情谊。.</p> <p><span>[word-break:keep-all]</span> 我梦想有一天,这个国家会站立起来,真正实现其信条的真谛:“我们认为人人生而平等的真理不言而喻。”我梦想有一天,在佐治亚的红山上,畴前奴隶的后嗣将能够和奴隶主的后嗣坐在一起,共叙兄弟情谊。</p> </body> </html>

技术图片

word-wrap 针对持续的英文长单词或者url网址(中文无效)

word-wrap:normal | break-word;

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/30667.html