我正在使用顺风创建一张带有箭头的卡片。我希望箭头始终位于文本旁边 10px。但是当文本换行时,文本的宽度大于文本的实际宽度。
我尝试添加width: fit-content,但文本会溢出并且无法换行。如果我添加width: min-content,那么文本总是换行。
在这种情况下,我必须使用 javascript 来获取文本的实际宽度,对吧?
这是我的代码:
<div class="grid grid-cols-3 gap-8 m-20 lg:max-w-[1200px]">
<div class="w-full h-52 overflow-hidden shadow-xl p-8 flex items-center justify-start gap-4">
<div class="min-w-[80px] min-h-[80px] bg-blue-500"></div>
<p class="text-xl font-bold">Software Solutions</p>
<svg width="7" height="12" viewBox="0 0 7 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.78125 0.75L6.25 5.5C6.375 5.65625 6.46875 5.84375 6.46875 6C6.46875 6.1875 6.375 6.375 6.25 6.53125L1.78125 11.2812C1.5 11.5938 1.03125 11.5938 0.71875 11.3125C0.40625 11.0312 0.40625 10.5625 0.6875 10.25L4.6875 6L0.6875 1.78125C0.40625 1.46875 0.40625 1 0.71875 0.71875C1.03125 0.4375 1.5 …Run Code Online (Sandbox Code Playgroud) 我正在学习 spring boot 自己开发一个电子商务网站。我认为像spring-boot-starter-web,这样的入门依赖项spring-boot-starter-security可以用于生产环境还是仅用于学习目的?
我正在用 Gatsby 前端和 Strapi 后端制作博客。我使用 StaticQuery 在组件中进行了查询
query={graphql`
query {
allStrapiArticle {
edges {
node {
strapiId
title
category {
name
}
image {
url
}
}
}
}
}
`}
Run Code Online (Sandbox Code Playgroud)
没有image{url}. 我收到错误:error Cannot query field "url" on type "File" graphql/template-strings。我该如何解决?谢谢!
css ×1
gatsby ×1
graphql ×1
html ×1
java ×1
spring ×1
spring-boot ×1
strapi ×1
tailwind-css ×1