如何在文本左侧添加空白?
https://jsfiddle.net/ydL4emkd/
.camera_caption {
display: inline-block;
position: relative;
width: 717px;
padding: 10px 20% 10px 10px;
color: white;
text-decoration: none;
overflow: hidden;
}
.camera_caption:before,
.camera_caption:after {
position: absolute;
content: '';
height: 50%;
width: 100%;
left: -15%;
z-index: -1;
background: red;
}
.camera_caption:before {
top: 0px;
transform: skew(45deg);
}
.camera_caption:after {
bottom: 0px;
transform: skew(-45deg);
}
我需要得到这个视觉结果:
最佳答案
在左边添加更多的内边距
.camera_caption {
....
padding-left: 100px;
}
关于css - 在左侧添加空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35798934/