以下是我的问题:
我的标题词溢出了div框。原因是该词的大小超过了div的宽度,而我设置了“nowrap”规则。显示效果如下:
我想让“FORMAT CAMERA”这几个词在div框的中心轴线上对齐,这样F的一部分会溢出到左边,A的一部分会溢出到右边。我该怎么做呢? 以下是我的简单CSS代码:
.content {
text-align: center;
}
h1(FORMAT CAMERA) {
color: white;
font-size: 50px;
font-family: "Rubik", sans-serif;
line-height: 1.4;
white-space: nowrap;
}