gpt4 book ai didi

jquery - CSS Sprite 不工作

转载 作者:太空宇宙 更新时间:2023-11-04 00:22:50 26 4
gpt4 key购买 nike

我在精神图像中有 10 个像素大小的图像我想将该图像用作此标题文本的背景我的 css 代码:

.header-text {
background:url(images/sp-images.jpg);
background-position-x: -0px;
background-position-y: -28px;
}

enter image description here

我的 html 代码:

<h1 class="header-text">let's Knockout Poverty in India!</h1>!

i want to apply that red shadow image as a background to the header text

最佳答案

CSS Sprite 不能在两个方向平铺。如果垂直堆叠 Sprite ,则可以水平平铺它们;如果将它们水平排列,则可以垂直平铺。

查看您的图像,它似乎在一个二乘二的网格中有四张图像。以这种方式设置,您将只能在非重复背景中使用这些 Sprite 。

关于jquery - CSS Sprite 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8338211/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com