html - 如何将换行的文本与中心对齐
问题描述
我有一个h1
元素被包裹在较小的屏幕中如何使用 css 使包裹的文本与中心对齐?
这就是我要的
welcome To our site, the no. 1 site
to get all ur books
解决方案
例如,h1 元素是 this <h1 class="heading">Welcome To our site, the no. 1 site to get all your books</h1>
,将其添加到 css 中:.heading{text-align:center}
推荐阅读
- kubernetes - 如何在k8s yaml文件中引用标签值
- google-cloud-platform - 使用 GKE 的 GCP 路由(启用 IP 别名)
- codeigniter - 如何重定向或显示自定义错误消息?
- html - 在最后一行包装弹性项目
- php - 如何通过php中的值区分两个数组?
- ruby-on-rails - 安装 Rails 或 gem 更新时出现错误 (Gem::RemoteFetcher::UnknownHostError)
- c# - 图像中的 EMGU CV 调用错误....对象....所有 Visual Studip 项目都是任何 cpu 目标...chaging 目标没有用
- azure - 应用程序能否使用 AD 身份验证而不是连接字符串密钥访问 Azure Cosmos
- django - 如何在 django rest 框架中发布多个字符串的请求?
- c# - 如何在 wpf c# 中编辑列表视图中的选定项目?