- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
这是我在 StackOverflow 上的第一个问题。直到今天,我总是能在这个网站上找到解决问题的办法,但这次我不得不打电话求助。
我需要显示来自数据库的文本。此文本包含换行符(不是 <br>
,只是一个空白返回 - 这就是它在数据库中的保存方式)。这段文字是有道理的。我在 Chrome 或 Firefox 上没有问题,但在 Safari 上,每个段落的最后一行(或准确地说是文本 block )也是合理的,在单词之间创建了很大的空间。奇怪的是,当我用光标突出显示文本时,每个段落的最后一行都在左边。
我申请了 text-align-last: left;
但它不会改变 Safari 上的任何东西。我也试过-webkit-text-align-last: left;
但我没有成功。文本在 <p>
中, 我试着把它变成 <div>
相反,但没有变化。
.quoteText {
font-family: Georgia;
font-style: italic;
font-size: 18px;
margin-top: 20px;
margin-left: 3%;
margin-right: 3%;
}
.justified {
white-space: pre-line;
text-align: justify;
text-align-last: left;
}
<p class="quoteText justified">
How often since then has she wondered what might have happened if she'd tried to remain with him; if she’d returned Richard's kiss on the corner of Bleeker and McDougal, gone off somewhere (where?) with him, never bought the packet of incense or the alpaca coat with rose-shaped buttons. Couldn’t they have discovered something larger and stranger than what they've got. It is impossible not to imagine that other future, that rejected future, as taking place in Italy or France, among big sunny rooms and gardens; as being full of infidelities and great battles; as a vast and enduring romance laid over friendship so searing and profound it would accompany them to the grave and possibly even beyond. She could, she thinks, have entered another world. She could have had a life as potent and dangerous as literature itself.
Or then again maybe not, Clarissa tells herself. That's who I was. This is who I am--a decent woman with a good apartment, with a stable and affectionate marriage, giving a party. Venture too far for love, she tells herself, and you renounce citizenship in the country you've made for yourself. You end up just sailing from port to port.
Still, there is this sense of missed opportunity. Maybe there is nothing, ever, that can equal the recollection of having been young together. Maybe it's as simple as that. Richard was the person Clarissa loved at her most optimistic moment. Richard had stood beside her at the pond's edge at dusk, wearing cut-off jeans and rubber sandals. Richard had called her Mrs. Dalloway, and they had kissed. His mouth had opened to hers; (exciting and utterly familiar, she'd never forget it) had worked its way shyly inside until she met its own. They'd kissed and walked around the pond together.
It had seemed like the beginning of happiness, and Clarissa is still sometimes shocked, more than thirty years later to realize that it was happiness; that the entire experience lay in a kiss and a walk. The anticipation of dinner and a book. The dinner is by now forgotten; Lessing has been long overshadowed by other writers. What lives undimmed in Clarissa's mind more than three decades later is a kiss at dusk on a patch of dead grass, and a walk around a pond as mosquitoes droned in the darkening air. There is still that singular perfection, and it's perfect in part because it seemed, at the time, so clearly to promise more. Now she knows: That was the moment, right then. There has been no other.
</p>
我希望整个文本对齐,并且每个文本 block 的最后一行左对齐。同样,它适用于 Chrome 和 Firefox,但不适用于 Safari。
最佳答案
实际上,Safari 不支持它。请检查以供引用: https://developer.mozilla.org/en-US/docs/Web/CSS/text-align-last
关于html - 为什么 "text-align-last"在 Safari 上不起作用并且行为异常?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56988344/
今天有小伙伴给我留言问到,try{...}catch(){...}是什么意思?它用来干什么? 简单的说 他们是用来捕获异常的 下面我们通过一个例子来详细讲解下
我正在努力提高网站的可访问性,但我不知道如何在页脚中标记社交媒体链接列表。这些链接指向我在 facecook、twitter 等上的帐户。我不想用 role="navigation" 标记这些链接,因
说现在是 6 点,我有一个 Timer 并在 10 点安排了一个 TimerTask。之后,System DateTime 被其他服务(例如 ntp)调整为 9 点钟。我仍然希望我的 TimerTas
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我就废话不多说了,大家还是直接看代码吧~ ? 1
Maven系列1 1.什么是Maven? Maven是一个项目管理工具,它包含了一个对象模型。一组标准集合,一个依赖管理系统。和用来运行定义在生命周期阶段中插件目标和逻辑。 核心功能 Mav
我是一名优秀的程序员,十分优秀!