frontend 相关问题

面向用户的应用程序部分。在桌面应用程序中,这将包括窗口框架和用户与之交互的表单;在命令行程序中,它将是可用的命令和参数;在Web应用程序中,它将引用HTML和JavaScript。

开发前端时页面顶部和左侧有空白

我正在 Django 中构建一个应用程序,并且为了编写模板,我使用 HTML/CSS,现在我在页面的顶部和左侧遇到一些奇怪的空白,但它不存在,不

回答 1 投票 0

我是使用堆栈还是制作独立的 API 和前端?

我制作网络应用程序已经有一段时间了。主要是前端。 我一直想制作功能齐全的网站,因此,我的问题是。 这个问题可能很愚蠢,所以请耐心等待......

回答 1 投票 0

如何在git中存储前端和后端?

我们的团队有一个小型网络应用程序项目。我们不明白后端和前端应该如何存储在git中。 有几个想法:将前端和后端存储在不同的存储库中......

回答 1 投票 0

单行高度不会改变

我正在尝试学习顺风,我做了一个带有网格的布局,我希望我的导航栏(占据第一行空间)只有32px,但是当我在其上应用高度时,它不会改变,谢谢。 导出默认

回答 1 投票 0

在 Angular 17 中如何显示占位符,直到使用 @defer 完全加载图像

这是一个项目列表,每个项目都包含一个图像,我想显示占位符,直到加载该卡中的图像为止 @defer() 中的条件是什么 @for(地点项目;tra...

回答 1 投票 0

可在 html/css 中自定义居中框网格?

这就是我的网站目前的样子: 在此输入图像描述 我试图使盒子具有固定的方形宽度,并希望它们始终水平和垂直居中。要么李...

回答 1 投票 0

在 LitElement 属性和 DOM 属性之间同步复选框状态时出现问题

问题描述: 我正在使用 LitElement 创建受控复选框组件。我面临着将 DOM 中复选框的选中属性与选中属性同步的问题...

回答 1 投票 0

避免删除 URL 末尾的尾部斜杠

当前: domain.com/(转到)=>domain.com/th 域名.com/th/ => 域名.com/th 域名.com/en/ => 域名.com/en 期待: 域名.com/ => 域名.com/th/ domain.com/th/ => 域名...

回答 3 投票 0

将对象的键值对作为单独的参数传递给 Angular 中的组件

假设我有一个组件,它接受三个输入 input1、input2 和 input3 导出类测试组件{ @Input() 输入1:字符串; @Input() 输入2:字符串; @Input() 输入3:字符串; .... ... }...

回答 1 投票 0

如何转义捕获分配的 Freemarker 输出?

我想转义变量的输出,该变量在示例 2 中使用了 <#assign> 的捕获语法。 示例1: <#assign test1='{"json": "more"}' /> 我想转义变量的输出,该变量在示例 2 中使用了 <#assign> 的捕获语法。 示例1: <#assign test1='{"json": "more"}' /> <div data-test1="${test1}"></div> 输出(转义): <div data-test1="{&quot;json&quot;: &quot;more&quot;}"></div> 示例2: <#assign test2><@compress single_line=true> { "json": "because it is more complex with list, if else etc." } </@compress></#assign> <div data-test2="${test2}"></div> 输出(未转义): <div data-test2="{ "json": "because it is more complex with list, if else etc." }"></div> 这正是docs描述此功能的方式。还有用于转义的docs。 我需要使用第二个示例,因为 test2 生成起来更复杂。 有没有办法强制转义或将非标记输出转换为标记?我尝试了?esc,<#outputformat><#autoesc>,重新分配给另一个变量。 没有任何效果。 找到解决方案。通过内置 ?markup_string 将标记输出转换为字符串。然后就会自动转义了。 <div data-test2="${test2?markup_string}"></div> 输出: <div data-test2="{ &quot;json&quot;: &quot;because it is more complex with list, if else etc.&quot; }"></div> 您需要将捕获生成的 JSON 的部分放入 <#outputformat "JSON">...</#outputformat> 中。 (plainText,或任何非标记输出格式也可以很好地工作,只要不抑制标记内的转义即可。) <#outputformat "JSON"> <#assign test2><@compress single_line=true> { "json": "because it is more complex with list, if else etc." } </@compress></#assign> </#outputformat> <div data-test2="${test2}"></div>

回答 2 投票 0

ReactJs 未正确加载

我正在尝试设置我的反应前端,但它不断中断,我附上了我应该看到的图像,我得到了,代码恰好是相同的,但我似乎无法弄清楚。 我是什么

回答 2 投票 0

打开WebUI个性化

我已经使用 docker 设置了 Open WebUI,并希望对登录页面进行一些更改以使其更加个性化。浏览所有文件并没有真正帮助,因为我没有......

回答 1 投票 0

项目中的角度问题

` 服务 应用程序包生成失败。 [3.343秒] X [错误] NG8001:“app-filmes-list”不是已知元素: 如果“app-filmes-list”是 Angular 组件,则验证它是否位于...

回答 1 投票 0

javascript 前端(浏览器环境)中的加密

我正在尝试在前端(javascript)中加密我的密码,然后再将其发送到后端(fastapi,python) 尽管许多谷歌搜索都说可以使用加密货币,但我看到它仅在

回答 1 投票 0

v-自动完成不显示列表中选择列表中的所有项目

我正在发送 v-autocomplete 项目属性上值为 1-100 的数组。但滚动条上只显示 40-50 之前的数字。 我正在发送 v-autocomplete 项目属性上值为 1-100 的数组。但滚动条上只显示 40-50 之前的数字。 <template> <v-app> <v-container> <v-autocomplete label="Autocomplete" :items="CountList" variant="outlined" > <template #item="{ item }"> <v-list-item>{{ item.raw }}</v-list-item> </template> </v-autocomplete> </v-container> </v-app> </template> <script setup> import { ref, inject } from 'vue' const CountList = ref([]) for (let i = 1; i <= 100; i++) { CountList.value.push(i) } </script> 在 dwopdown 列表中应该显示直到 100 的数字。但是当我使用 时,直到 100 为止都不会显示完整的数字。 我查看了 vuetify 文档,在 v-autocomplete 的项目槽部分中它说: “定义自定义项目外观。此插槽的根元素必须是应用了 v-bind="props" 的 v-list-item。props 包含默认选择列表行为所需的所有内容 - 包括标题、值、单击处理程序、虚拟滚动以及使用 item-props 添加的任何其他内容。” 所以我想你需要将道具绑定到你的插槽上。这显示了 100 以内的所有项目。 <template #item="{ props, item }"> <v-list-item v-bind="props" :title="item.raw"/> </template> 游乐场 您可以添加 item-title 属性,如下所示: <v-autocomplete label="Autocomplete" :items="CountList" variant="outlined" :item-title="item => item" > </v-autocomplete>

回答 2 投票 0

更改 Bootstrap API 中按钮的高度

有没有办法增加 Bootstrap api 中按钮的行高,因为我在创建按钮时遇到问题 这是我的代码: @import“bootstrap-5.3.3/scss/mixins”; @import“启动...

回答 1 投票 0

无法检测卡片重叠状态的问题

<div> </div> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src=&#34;https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js&#34;&gt;&lt;/script&gt; &lt;script src=&#34;https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js&#34;&gt;&lt;/script&gt; &lt;link rel=&#34;stylesheet&#34; href=&#34;https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css&#34;&gt; &lt;title&gt;Game Cards App&lt;/title&gt; &lt;link rel=&#34;icon&#34; type=&#34;image/png&#34; href=&#34;https://cdn1.iconfinder.com/data/icons/entertainment-events-hobbies/24/card-game-cards-hold-512.png&#34;&gt; &lt;style&gt; .card-partially-visible { pointer-events: none; } #main-content { display: none; } * { box-sizing: border-box; } body { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-flow: column wrap; background: radial-gradient(circle, rgba(7, 50, 22, 255) 0%, rgba(0, 0, 0, 255) 100%); animation: shine 4s linear infinite; color: white; font-family: &#34;Lato&#34;; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; } ul { margin: 0; padding: 0; list-style-type: none; max-width: 800px; width: 100%; margin: 0 auto; padding: 15px; text-align: center; overflow-x: hidden; } .card { float: left; position: relative; width: calc(33.33% - 30px + 9.999px); height: 340px; margin: 0 30px 30px 0; perspective: 1000; } .card:first-child .card__front { background:#5271C2; } .card__front img { width: 100%; height: 100%; object-fit: cover; } .card:first-child .card__num { text-shadow: 1px 1px rgba(52, 78, 147, 0.8) } .card:nth-child(2) .card__front { background:#35a541; } .card:nth-child(2) .card__num { text-shadow: 1px 1px rgba(34, 107, 42, 0.8); } .card:nth-child(3) { margin-right: 0; } .card:nth-child(3) .card__front { background: #bdb235; } .card:nth-child(3) .card__num { text-shadow: 1px 1px rgba(129, 122, 36, 0.8); } .card:nth-child(4) .card__front { background: #db6623; } .card:nth-child(4) .card__num { text-shadow: 1px 1px rgba(153, 71, 24, 0.8); } .card:nth-child(5) .card__front { background: #3e5eb3; } .card:nth-child(5) .card__num { text-shadow: 1px 1px rgba(42, 64, 122, 0.8); } .card:nth-child(6) .card__front { background: #aa9e5c; } .card:nth-child(6) .card__num { text-shadow: 1px 1px rgba(122, 113, 64, 0.8); } .card:last-child { margin-right: 0; } .card__flipper { cursor: pointer; transform-style: preserve-3d; transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1); border: 3.5px solid rgba(255, 215, 0, 0.6); background-image: linear-gradient(45deg, rgba(255, 215, 0, 0.5), transparent, rgba(255, 215, 0, 0.5)); } .card__front, .card__back { position: absolute; backface-visibility: hidden; top: 0; left: 0; width: 100%; height: 340px; } .card__front { transform: rotateY(0); z-index: 2; overflow: hidden; } .card__back { transform: rotateY(180deg) scale(1.1); background: linear-gradient(45deg, #483D8B, #301934, #483D8B, #301934); display: flex; flex-flow: column wrap; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); } .card__back span { font-weight: bold; /* Metni kalın yap */ color: white; /* Beyaz renk */ font-size: 16px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .card__name { font-size: 32px; line-height: 0.9; font-weight: 700; } .card__name span { font-size: 14px; } .card__num { font-size: 100px; margin: 0 8px 0 0; font-weight: 700; } @media (max-width: 700px) { .card__num { font-size: 70px; } } @media (max-width: 700px) { .card { width: 100%; height: 290px; margin-right: 0; float: none; } .card .card__front, .card .card__back { height: 290px; overflow: hidden; } } /* Demo */ main { text-align: center; } main h1, main p { margin: 0 0 12px 0; } main h1 { margin-top: 12px; font-weight: 300; } .fa-github { color: white; font-size: 50px; margin-top: 8px; } .tm-container { display: flex; justify-content: center; align-items: center; } .tm-letter { display:inline-block; font-size:30px; margin: 0 5px; margin-top: 10px; opacity: 0; transform: translateY(0); animation: letter-animation 6s ease-in-out infinite; } @keyframes letter-animation { 0%, 100% { opacity: 1; transform: translateY(0); } 10%, 40%, 60%, 90% { opacity: 1; transform: translateY(-10px); } 20%, 80% { opacity: 1; transform: translateY(0); } } #m-letter { animation-delay: 1.5s; } a { position: relative; display: inline-block; padding: 0px; } a::before { content: &#39;&#39;; position: absolute; top: 50%; /* Orta konumu */ left: 50%; /* Orta konumu */ transform: translate(-50%, -50%); width: 50px; height: 45px; border-radius: 50%; /* Eğer bir daire şeklinde efekt isteniyorsa */ box-shadow: 0 0 8px 4px rgba(110, 110, 110, 0.8); filter: blur(4px) brightness(1.5); / opacity: 0; transition: opacity 0.3s ease, transform 0.3s ease; z-index: -1; } a:hover::before { opacity: 1; } body.hoverEffect { background: radial-gradient(circle at center, #000000, #000033, #000066, #1a1a1a); } #gameCard { width: 300px; height: 450px; margin: 50px auto; padding: 20px; border-radius: 15px; box-shadow: 0 0 50px 10px #FFD700, 0 0 100px 20px #0000FF, 0 0 150px 30px #000033; background: rgba(0,0,0,0.7); color:#FFD700; text-align: center; border: 3px solid #FFD700; } #gameCardLink span { font-size: 18px; margin-right: 5px; font-weight: bold; } #gameCardLink span:last-child { font-size: 0.79em; vertical-align: super; opacity: 0.9; font-weight: bold; text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5); } #loading-animation { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-image:url(&#39;data:image/jpeg;base64,/); background-repeat: no-repeat; background-size: cover ; display: flex; justify-content: center; align-items: center; z-index: 9999; } .loader { border-top: 9px solid #00a2ed; border-radius: 80%; width: 12vw; height: 12vw; animation: spin 2s linear infinite; position: absolute; left: 44%; top: 46%; / transform: translate(-50%, -50%) rotate(0deg); /* Yuvarlak halkanın tam ortasında olması için bu dönüşümü kullanın. */ } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id=&#34;loading-animation&#34;&gt; &lt;div class=&#34;loader&#34;&gt;&lt;/div&gt; &lt;/div&gt; &lt;div id=&#34;main-content&#34;&gt; &lt;div class=&#34;tm-container&#34;&gt; &lt;div class=&#34;tm-letter&#34; id=&#34;t-letter&#34;&gt;T&lt;/div&gt; &lt;div class=&#34;tm-letter&#34; id=&#34;m-letter&#34;&gt;M&lt;/div&gt; &lt;/div&gt; &lt;audio id=&#34;flipSound&#34; preload=&#34;auto&#34;&gt; &lt;source src=&#34;https://cdn.freesound.org/previews/321/321114_2776777-lq.ogg&#34; type=&#34;audio/wav&#34;&gt; &lt;/audio&gt; &lt;main&gt; &lt;div id=&#34;gameCardLink&#34;&gt; &lt;span&gt;G&lt;/span&gt; &lt;span&gt;a&lt;/span&gt; &lt;span&gt;m&lt;/span&gt; &lt;span&gt;e&lt;/span&gt; &lt;span&gt; &lt;/span&gt; &lt;!-- Boşluk eklemek için span ekledik --&gt; &lt;span&gt; &lt;/span&gt; &lt;span&gt;C&lt;/span&gt; &lt;span&gt; &lt;/span&gt; &lt;span&gt;a&lt;/span&gt; &lt;span&gt; &lt;/span&gt; &lt;span&gt;r&lt;/span&gt; &lt;span&gt; &lt;/span&gt; &lt;span&gt;d&lt;/span&gt; &lt;span&gt; &lt;/span&gt; &lt;span&gt;s&lt;/span&gt; &lt;span&gt;®&lt;/span&gt; &lt;/div&gt; &lt;p&gt;&lt;a href=&#34;https://github.com/murattasci06&#34;&gt;&lt;i class=&#34;fab fa-github&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/p&gt; &lt;/main&gt; &lt;ul&gt; &lt;li class=&#34;card&#34; &gt; &lt;div class=&#34;card__flipper&#34;&gt; &lt;div class=&#34;card__front&#34;&gt; &lt;img src=&#34;https://gecbunlari.com/wp-content/uploads/2021/12/Spiderman-No-Way-Home.jpg&#34; alt=&#34;Spiderman&#34;&gt; &lt;p class=&#34;card__name&#34;&gt;&lt;span&gt;Marvel&lt;/span&gt;&lt;br&gt;Spiderman&lt;/p&gt; &lt;p class=&#34;card__num&#34;&gt;1&lt;/p&gt; &lt;/div&gt; &lt;iframe class=&#34;frame&#34; width=&#34;225&#34; height=&#34;340&#34; src=&#34;https://www.youtube.com/embed/JfVOs4VSpmA?autoplay=1&amp;mute=1&amp;vq=hd1080&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen &gt;&lt;/iframe&gt; &lt;div class=&#34;card__back&#34;&gt; &lt;svg height=&#34;180&#34; width=&#34;180&#34;&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;65&#34; stroke=&#34;#514d9b&#34; stroke-width=&#34;35&#34; /&gt; &lt;!-- Dış dairenin kenarı (yeşil) --&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;83&#34; fill=&#34;none&#34; stroke=&#34;rgba(7, 50, 22, 255)&#34; stroke-width=&#34;1&#34; /&gt; &lt;/svg&gt; &lt;span&gt;1.89 Bil. $&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class=&#34;card&#34;&gt; &lt;div class=&#34;card__flipper&#34;&gt; &lt;div class=&#34;card__front&#34;&gt; &lt;img src=&#34;https://i.pinimg.com/736x/1e/f1/3d/1ef13dfa4b7b8c131302e242d1ec48d7.jpg&#34; alt=&#34;Batman&#34;&gt; &lt;p class=&#34;card__name&#34;&gt;&lt;span&gt;DC&lt;/span&gt;&lt;br&gt;Batman&lt;/p&gt; &lt;p class=&#34;card__num&#34;&gt;2&lt;/p&gt; &lt;/div&gt; &lt;iframe class=&#34;frame&#34; width=&#34;225&#34; height=&#34;340&#34; src=&#34;https://www.youtube.com/embed/mqqft2x_Aa4?autoplay=1&amp;mute=1&amp;vq=hd1080&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen &gt;&lt;/iframe&gt; &lt;div class=&#34;card__back&#34;&gt; &lt;svg height=&#34;180&#34; width=&#34;180&#34;&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;65&#34; stroke=&#34;#35a541&#34; stroke-width=&#34;35&#34;/&gt; &lt;!-- Dış dairenin kenarı (yeşil) --&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;83&#34; fill=&#34;none&#34; stroke=&#34;rgba(7, 50, 22, 255)&#34; stroke-width=&#34;1&#34; /&gt; &lt;/svg&gt; &lt;span&gt;771 Mil. $&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class=&#34;card&#34;&gt; &lt;div class=&#34;card__flipper&#34;&gt; &lt;div class=&#34;card__front&#34;&gt; &lt;img src=&#34;https://wallpapercave.com/wp/wp12279011.jpg&#34; alt=&#34;Guardians_of_the_Galaxy_Vol_3&#34;&gt; &lt;p class=&#34;card__name&#34;&gt;&lt;span&gt;Marvel&lt;/span&gt;&lt;br&gt;Guardians_of_the_Galaxy_Vol_3&lt;/p&gt; &lt;p class=&#34;card__num&#34;&gt;3&lt;/p&gt; &lt;/div&gt; &lt;iframe class=&#34;frame&#34; width=&#34;225&#34; height=&#34;340&#34; src=&#34;https://www.youtube.com/embed/u3V5KDHRQvk?autoplay=1&amp;mute=1&amp;vq=hd1080&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen &gt;&lt;/iframe&gt; &lt;div class=&#34;card__back&#34;&gt; &lt;svg height=&#34;180&#34; width=&#34;180&#34;&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;65&#34; stroke=&#34;#bdb235&#34; stroke-width=&#34;35&#34;/&gt; &lt;!-- Dış dairenin kenarı (yeşil) --&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;83&#34; fill=&#34;none&#34; stroke=&#34;rgba(7, 50, 22, 255)&#34; stroke-width=&#34;1&#34; /&gt; &lt;/svg&gt; &lt;span&gt;845.4 Mil. $&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class=&#34;card&#34;&gt; &lt;div class=&#34;card__flipper&#34;&gt; &lt;div class=&#34;card__front&#34;&gt; &lt;img src=&#34;https://wallpaperaccess.com/full/8940499.jpg&#34; alt=&#34;Shazam&#34;&gt; &lt;p class=&#34;card__name&#34;&gt;&lt;span&gt;DC&lt;/span&gt;&lt;br&gt;Shazam2&lt;/p&gt; &lt;p class=&#34;card__num&#34;&gt;4&lt;/p&gt; &lt;/div&gt; &lt;iframe class=&#34;frame&#34; width=&#34;225&#34; height=&#34;340&#34; src=&#34;https://www.youtube.com/embed/AIc671o9yCI?autoplay=1&amp;mute=1&amp;vq=hd1080&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen &gt;&lt;/iframe&gt; &lt;div class=&#34;card__back&#34;&gt; &lt;svg height=&#34;180&#34; width=&#34;180&#34;&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;65&#34; stroke=&#34;#db6623&#34; stroke-width=&#34;35&#34;/&gt; &lt;!-- Dış dairenin kenarı (yeşil) --&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;83&#34; fill=&#34;none&#34; stroke=&#34;rgba(7, 50, 22, 255)&#34; stroke-width=&#34;1&#34; /&gt; &lt;/svg&gt; &lt;span&gt;462.5 Mil. $&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class=&#34;card&#34;&gt; &lt;div class=&#34;card__flipper&#34;&gt; &lt;div class=&#34;card__front&#34;&gt; &lt;img src=&#34;https://images2.alphacoders.com/131/1316679.jpeg&#34; alt=&#34;Flash&#34;&gt; &lt;p class=&#34;card__name&#34;&gt;&lt;span&gt;DC&lt;/span&gt;&lt;br&gt;Flash&lt;/p&gt; &lt;p class=&#34;card__num&#34;&gt;5&lt;/p&gt; &lt;/div&gt; &lt;iframe class=&#34;frame&#34; width=&#34;225&#34; height=&#34;340&#34; src=&#34;https://www.youtube.com/embed/hebWYacbdvc?autoplay=1&amp;mute=1&amp;vq=hd1080&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen &gt;&lt;/iframe&gt; &lt;div class=&#34;card__back&#34;&gt; &lt;svg height=&#34;180&#34; width=&#34;180&#34;&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;65&#34; stroke=&#34;#3e5eb3&#34; stroke-width=&#34;35&#34;/&gt; &lt;!-- Dış dairenin kenarı (yeşil) --&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;83&#34; fill=&#34;none&#34; stroke=&#34;rgba(7, 50, 22, 255)&#34; stroke-width=&#34;1&#34; /&gt; &lt;/svg&gt; &lt;span&gt;560.2 Mil. $&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class=&#34;card&#34;&gt; &lt;div class=&#34;card__flipper&#34;&gt; &lt;div class=&#34;card__front&#34;&gt; &lt;img src=&#34; https://images3.alphacoders.com/121/1213553.jpg&#34; alt=&#34;Dr_Strange_2&#34;&gt; &lt;p class=&#34;card__name&#34;&gt;&lt;span&gt;Marvel&lt;/span&gt;&lt;br&gt;Dr_Strange_2&lt;/p&gt; &lt;p class=&#34;card__num&#34;&gt;6&lt;/p&gt; &lt;/div&gt; &lt;iframe class=&#34;frame&#34; width=&#34;225&#34; height=&#34;340&#34; src=&#34;https://www.youtube.com/embed/aWzlQ2N6qqg?autoplay=1&amp;mute=1&amp;vq=hd1080&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen &gt;&lt;/iframe&gt; &lt;div class=&#34;card__back&#34;&gt; &lt;svg height=&#34;180&#34; width=&#34;180&#34;&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;65&#34; stroke=&#34;#aa9e5c&#34; stroke-width=&#34;35&#34;/&gt; &lt;!-- Dış dairenin kenarı (yeşil) --&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;83&#34; fill=&#34;none&#34; stroke=&#34;rgba(7, 50, 22, 255)&#34; stroke-width=&#34;1&#34; /&gt; &lt;/svg&gt; &lt;span&gt;955.8 Mil. $&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/body&gt; &lt;script&gt; var Flipper = (function() { var card = $(&#39;.card&#39;); var flipper = card.find(&#39;.card__flipper&#39;); var win = $(window); var flip = function() { var thisCard = $(this); var thisFlipper = thisCard.find(&#39;.card__flipper&#39;); var offset = thisCard.offset(); var xc = win.width() / 2; var yc = win.height() / 2; var docScroll = $(document).scrollTop(); var cardW = thisCard.outerWidth() / 2; var cardH = thisCard.height() / 2; var transX = xc - offset.left - cardW; var transY = docScroll + yc - offset.top - cardH; // if (offset.top &gt; card.height()) transY = docScroll - offset.top + cardH; if (win.width() &lt;= 700) transY = 0; if (card.hasClass(&#39;active&#39;)) unflip(); thisCard.css({&#39;z-index&#39;: &#39;3&#39;}).addClass(&#39;active&#39;); thisFlipper.css({ &#39;transform&#39;: &#39;translate3d(&#39; + transX + &#39;px,&#39; + transY + &#39;px, 0) rotateY(180deg) scale(1)&#39;, &#39;-webkit-transform&#39;: &#39;translate3d(&#39; + transX + &#39;px,&#39; + transY + &#39;px, 0) rotateY(180deg) scale(1)&#39;, &#39;-ms-transform&#39;: &#39;translate3d(&#39; + transX + &#39;px,&#39; + transY + &#39;px, 0) rotateY(180deg) scale(1)&#39; }).addClass(&#39;active&#39;); return false; }; var unflip = function(e) { card.css({&#39;z-index&#39;: &#39;1&#39;}).removeClass(&#39;active&#39;); flipper.css({ &#39;transform&#39;: &#39;none&#39;, &#39;-webkit-transform&#39;: &#39;none&#39;, &#39;-ms-transform&#39;: &#39;none&#39; }).removeClass(&#39;active&#39;); }; var bindActions = function() { card.on(&#39;click&#39;, flip); win.on(&#39;click&#39;, unflip); } var init = function() { bindActions(); }; return { init: init }; }()); Flipper.init(); &lt;/script&gt; &lt;script&gt; &lt;!-- HOOVER FOR TRAILER --&gt; let hoverTimeout; $(&#39;.card&#39;).hover(function() { const currentCard = $(this); // Store the current card element in a variable hoverTimeout = setTimeout(() =&gt; { currentCard.find(&#39;.card__front&#39;).hide(); currentCard.find(&#39;.iframe&#39;).show(); var src = currentCard.find(&#39;.iframe&#39;).attr(&#34;src&#34;); currentCard.find(&#39;.iframe&#39;).attr(&#34;src&#34;, src); // Add fullscreen functionality currentCard.find(&#39;.iframe&#39;).on(&#39;click&#39;, function() { $(this).requestFullscreen(); }); }, 5000); // 5000 milliseconds (5 seconds) }, function() { clearTimeout(hoverTimeout); // Clear the timeout to prevent actions if the user moves away before 5 seconds $(this).find(&#39;.card__front&#39;).show(); $(this).find(&#39;.iframe&#39;).hide(); var src = $(this).find(&#39;.iframe&#39;).attr(&#34;src&#34;); if (src) { $(this).find(&#39;.iframe&#39;).attr(&#34;src&#34;, src.replace(&#39;?autoplay=1&#39;, &#39;&#39;)); } }); &lt;/script&gt; &lt;script&gt; var cardFlags = {}; $(document).ready(function() { var flipSound = document.getElementById(&#34;flipSound&#34;); // Sesin yalnızca kartın ön yüzüne tıklandığında çalmasını sağlayın. $(&#34;.card__front&#34;).click(function() { console.log(&#39;Kart önüne tıklandı&#39;, event.target); flipSound.currentTime = 0; flipSound.play(); console.log(&#39;dönüş sesi çalındı&#39;, event.target); }); $(&#34;.card&#34;).click(function() { var card = $(this); var cardId = card.find(&#34;.card__num&#34;).text(); console.log(cardId); // Check if the card is not already flipping to avoid multiple flips if (!card.hasClass(&#39;flipping&#39;)) { card.addClass(&#39;flipping&#39;); // Check if the front side is facing the viewer if (!card.hasClass(&#34;flipped&#34;)) { console.log(&#34;is card flag true or false&#34;, cardId); if (!cardFlags[cardId]) { startAnimation(div); console.log(&#34;started&#34;); cardFlags[cardId] = true; card.addClass(&#34;flipped&#34;); } // Adding canvas to back-side var div = document.querySelector(&#39;.flipped .card__flipper.active .card__back&#39;); var canvas = document.getElementsByClassName(&#39;p5Canvas&#39;)[0]; if (div &amp;&amp; canvas) { div.appendChild(canvas); canvas.style.position = &#39;absolute&#39;; } } else { console.log(&#34;stopped&#34;); card.removeClass(&#34;flipped&#34;); } setTimeout(function() { card.removeClass(&#39;flipping&#39;); }, 1000); } }); // Prevent sound on back side click $(&#34;.card__back&#34;).click(function(e) { e.stopPropagation(); }); }); &lt;/script&gt; &lt;script&gt; // Body&#39;s hoover effect document.getElementById(&#34;gameCardLink&#34;).addEventListener(&#34;mouseover&#34;, function() { document.body.classList.add(&#34;hoverEffect&#34;); }); document.getElementById(&#34;gameCardLink&#34;).addEventListener(&#34;mouseout&#34;, function() { document.body.classList.remove(&#34;hoverEffect&#34;); }); &lt;/script&gt; &lt;script&gt; // Portal effect var p5Instance; function startAnimation(div) { // adding canvas to back-side var canvas = document.getElementsByClassName(&#39;p5Canvas&#39;)[0]; if (div &amp;&amp; canvas) { div.appendChild(canvas); canvas.style.position = &#39;absolute&#39;; } const sketch = (p) =&gt; { const createParticleSystem = (location) =&gt; { const origin = location.copy(); const particles = []; const addParticle = velocity =&gt; { const rand = p.random(0, 1); if (rand &lt;= .3) { particles.push(createSparkParticle(origin, velocity.copy())); } else { particles.push(createParticle(origin, velocity.copy())); } }; const applyForce = force =&gt; { particles.forEach(particle =&gt; { particle.applyForce(force); }); }; const run = () =&gt; { particles.forEach((particle, index) =&gt; { particle.move(); particle.draw(); if (particle.isDead()) { particles.splice(index, 1); } }); }; return { origin, addParticle, run, applyForce }; }; const createSparkParticle = (locationP, velocity) =&gt; { const particle = createParticle(locationP, velocity); let fade = 255; const draw = () =&gt; { p.colorMode(p.HSB); p.stroke(16, 62, 100, fade); const arrow = velocity.copy().normalize().mult(p.random(2, 4)); const direction = p5.Vector.add(particle.location, arrow); p.line(particle.location.x, particle.location.y, direction.x, direction.y); }; const move = () =&gt; { particle.applyForce(p.createVector(p.random(-.2, .2), p.random(-0.1, -0.4))); particle.velocity.add(particle.acc); particle.location.add(particle.velocity.copy().normalize().mult(p.random(2, 4))); particle.acc.mult(0); fade -= 5; }; return { ...particle, draw, move } } const createParticle = (locationP, velocity) =&gt; { const acc = p.createVector(0, 0); const location = locationP.copy(); let fade = 255; const fadeMinus = p.randomGaussian(15, 2); let ligther = 100; let situate = 62; const draw = () =&gt; { p.colorMode(p.HSB) p.stroke(16, p.constrain(situate, 62, 92), p.constrain(ligther, 60, 100), fade); const arrow = velocity.copy().mult(2); const direction = p5.Vector.add(location, arrow); p.line(location.x, location.y, direction.x, direction.y); }; const move = () =&gt; { velocity.add(acc); location.add(velocity.copy().div(p.map(velocity.mag(), 18, 0, 5, 1))); acc.mult(0); fade -= fadeMinus; ligther -= 8; situate += 8; }; const applyForce = force =&gt; { acc.add(force); }; const isDead = () =&gt; { if (fade &lt; 0 || location.x &lt; 0 || location.x &gt; p.width || location.y &gt; p.height) { return true; } else { return false; } }; return { draw, move, applyForce, isDead, velocity, location, acc }; }; const createMover = () =&gt; { const location = p.createVector(p.width / 2, p.height / 2); const velocity = p.createVector(0, 0); const acc = p.createVector(0, 0); const mass = 10; let angle = 0; let angleVelocity = 0; let angleAcc = 0; let len = 100; const particleSystems = [ createParticleSystem(location), createParticleSystem(location), createParticleSystem(location), createParticleSystem(location), createParticleSystem(location), createParticleSystem(location), createParticleSystem(location), createParticleSystem(location), createParticleSystem(location) ]; const getGotoVector = angle =&gt; { const radius = p.map(angleVelocity, 0, 0.3, 0, 80); const goToVector = p.createVector( location.x + radius * p.cos(angle), location.y + radius * p.sin(angle) ); return goToVector; }; const draw = () =&gt; { const goToVector = getGotoVector(angle); particleSystems.forEach(particleSystem =&gt; { particleSystem.run(); }); }; const renderParticleSystem = () =&gt; { particleSystems.forEach(particleSystem =&gt; { const goToVector = getGotoVector(angle - p.random(0, p.TWO_PI)); const prepencular = p.createVector( (goToVector.y - location.y)*-1, (goToVector.x - location.x) ); prepencular.normalize(); prepencular.mult(angleVelocity * 70); particleSystem.origin.set(goToVector); particleSystem.addParticle(prepencular); const gravity = p.createVector(0, 0.3); particleSystem.applyForce(gravity); }); }; const move = () =&gt; { angleAcc = 0.005; angleVelocity = p.constrain(angleVelocity + angleAcc, 0, 0.32); angle += angleVelocity; angleAcc = 0; renderParticleSystem(); }; return { draw, move }; }; let mover; p.setup = function() { p.createCanvas(230, 320); p.clear(); mover = createMover(); } p.draw = function() { p.clear(); mover.move(); mover.draw(); } }; p5Instance = new p5(sketch); } &lt;/script&gt; &lt;script&gt; // hiding and showing loading animation function hideLoadingAnimation() { console.log(&#34;Yükleme animasyonu gizleniyor, ana içerik gösteriliyor&#34;); var loadingAnimation = document.getElementById(&#34;loading-animation&#34;); var mainContent = document.getElementById(&#34;main-content&#34;); loadingAnimation.style.display = &#34;none&#34;; mainContent.style.display = &#34;block&#34;; } window.onload = function() { console.log(&#34;Sayfa tamamen yüklendi&#34;); hideLoadingAnimation(); }; &lt;/script&gt; &lt;/html&gt; </code></pre> <p>朋友们大家好,在该问题的图片中,有一张中间颠倒的紫色卡片。上面和下面各有 2 张牌与这张牌重叠。当卡片正面和背面相互重叠时,我如何轻松确保正面半可见的卡片底部不会通过悬停播放预告片(<strong>鼠标事件在这种情况下不起作用</strong>)?用CSS?我正在尝试用非常简单的方法来解决这个问题。</p> <pre><code>card-partially-visible { pointer-events: none; } </code></pre> <p>这样的事情有意义吗?如果是这样,您应该如何确定它是否部分可见? 有没有现成的功能可以自动检测?</p> <p><a href="https://i.stack.imgur.com/fMLLv.png" target="_blank"><img src="https://cdn.txt58.com/i/AWkuc3RhY2suaW1ndXIuY29tL2ZNTEx2LnBuZw==" alt=""/></a></p> </question> <answer tick="false" vote="1"> <p>如果将 3D 过渡从 <pre><code>.card__flipper</code></pre> 移动到 <pre><code>.card</code></pre> 本身,您可以给出任何 <pre><code>.card.active</code></pre> <pre><code>::before</code></pre> 和 <pre><code>::after</code></pre> 伪元素,这将覆盖后面的卡片。</p> <p>在下面的工作示例中,我将伪元素设置为半透明红色(即<pre><code>rgba(255, 0, 0, 0.5)</code></pre>),以便您可以看到它们,但通常您只需将伪元素设置为透明即可:<pre><code>rgba(0, 0, 0, 0)</code></pre>。</p> <hr/> <p><strong>工作示例:</strong></p> <p></p><div data-babel="false" data-lang="js" data-hide="false" data-console="true"> <div> <pre><code>var Flipper = (function() { var card = $(&#39;.card&#39;); var flipper = card.find(&#39;.card__flipper&#39;); var win = $(window); var flip = function() { var thisCard = $(this); var thisFlipper = thisCard.find(&#39;.card__flipper&#39;); var offset = thisCard.offset(); var xc = win.width() / 2; var yc = win.height() / 2; var docScroll = $(document).scrollTop(); var cardW = thisCard.outerWidth() / 2; var cardH = thisCard.height() / 2; var transX = xc - offset.left - cardW; var transY = docScroll + yc - offset.top - cardH; // if (offset.top &gt; card.height()) transY = docScroll - offset.top + cardH; if (win.width() &lt;= 700) transY = 0; if (card.hasClass(&#39;active&#39;)) unflip(); thisCard.css({&#39;z-index&#39;: &#39;3&#39;}).css({ &#39;transform&#39;: &#39;translate3d(&#39; + transX + &#39;px,&#39; + transY + &#39;px, 0) rotateY(180deg) scale(1)&#39; }).addClass(&#39;active&#39;); thisFlipper.addClass(&#39;active&#39;); return false; }; var unflip = function(e) { card.css({&#39;z-index&#39;: &#39;1&#39;}).css({ &#39;transform&#39;: &#39;none&#39; }).removeClass(&#39;active&#39;); flipper.removeClass(&#39;active&#39;); }; var bindActions = function() { card.on(&#39;click&#39;, flip); win.on(&#39;click&#39;, unflip); } var init = function() { bindActions(); }; return { init: init }; }()); Flipper.init(); &lt;!-- HOOVER FOR TRAILER --&gt; let hoverTimeout; $(&#39;.card&#39;).hover(function() { const currentCard = $(this); // Store the current card element in a variable hoverTimeout = setTimeout(() =&gt; { currentCard.find(&#39;.card__front&#39;).hide(); currentCard.find(&#39;.iframe&#39;).show(); var src = currentCard.find(&#39;.iframe&#39;).attr(&#34;src&#34;); currentCard.find(&#39;.iframe&#39;).attr(&#34;src&#34;, src); // Add fullscreen functionality currentCard.find(&#39;.iframe&#39;).on(&#39;click&#39;, function() { $(this).requestFullscreen(); }); }, 5000); // 5000 milliseconds (5 seconds) }, function() { clearTimeout(hoverTimeout); // Clear the timeout to prevent actions if the user moves away before 5 seconds $(this).find(&#39;.card__front&#39;).show(); $(this).find(&#39;.iframe&#39;).hide(); var src = $(this).find(&#39;.iframe&#39;).attr(&#34;src&#34;); if (src) { $(this).find(&#39;.iframe&#39;).attr(&#34;src&#34;, src.replace(&#39;?autoplay=1&#39;, &#39;&#39;)); } }); var cardFlags = {}; $(document).ready(function() { var flipSound = document.getElementById(&#34;flipSound&#34;); // Sesin yalnızca kartın ön yüzüne tıklandığında çalmasını sağlayın. $(&#34;.card__front&#34;).click(function() { console.log(&#39;Kart önüne tıklandı&#39;, event.target); flipSound.currentTime = 0; flipSound.play(); console.log(&#39;dönüş sesi çalındı&#39;, event.target); }); $(&#34;.card&#34;).click(function() { var card = $(this); var cardId = card.find(&#34;.card__num&#34;).text(); console.log(cardId); // Check if the card is not already flipping to avoid multiple flips if (!card.hasClass(&#39;flipping&#39;)) { card.addClass(&#39;flipping&#39;); // Check if the front side is facing the viewer if (!card.hasClass(&#34;flipped&#34;)) { console.log(&#34;is card flag true or false&#34;, cardId); if (!cardFlags[cardId]) { startAnimation(div); console.log(&#34;started&#34;); cardFlags[cardId] = true; card.addClass(&#34;flipped&#34;); } // Adding canvas to back-side var div = document.querySelector(&#39;.flipped .card__flipper.active .card__back&#39;); var canvas = document.getElementsByClassName(&#39;p5Canvas&#39;)[0]; if (div &amp;&amp; canvas) { div.appendChild(canvas); canvas.style.position = &#39;absolute&#39;; } } else { console.log(&#34;stopped&#34;); card.removeClass(&#34;flipped&#34;); } setTimeout(function() { card.removeClass(&#39;flipping&#39;); }, 1000); } }); // Prevent sound on back side click $(&#34;.card__back&#34;).click(function(e) { e.stopPropagation(); }); }); // Body&#39;s hoover effect document.getElementById(&#34;gameCardLink&#34;).addEventListener(&#34;mouseover&#34;, function() { document.body.classList.add(&#34;hoverEffect&#34;); }); document.getElementById(&#34;gameCardLink&#34;).addEventListener(&#34;mouseout&#34;, function() { document.body.classList.remove(&#34;hoverEffect&#34;); }); // Portal effect var p5Instance; function startAnimation(div) { // adding canvas to back-side var canvas = document.getElementsByClassName(&#39;p5Canvas&#39;)[0]; if (div &amp;&amp; canvas) { div.appendChild(canvas); canvas.style.position = &#39;absolute&#39;; } const sketch = (p) =&gt; { const createParticleSystem = (location) =&gt; { const origin = location.copy(); const particles = []; const addParticle = velocity =&gt; { const rand = p.random(0, 1); if (rand &lt;= .3) { particles.push(createSparkParticle(origin, velocity.copy())); } else { particles.push(createParticle(origin, velocity.copy())); } }; const applyForce = force =&gt; { particles.forEach(particle =&gt; { particle.applyForce(force); }); }; const run = () =&gt; { particles.forEach((particle, index) =&gt; { particle.move(); particle.draw(); if (particle.isDead()) { particles.splice(index, 1); } }); }; return { origin, addParticle, run, applyForce }; }; const createSparkParticle = (locationP, velocity) =&gt; { const particle = createParticle(locationP, velocity); let fade = 255; const draw = () =&gt; { p.colorMode(p.HSB); p.stroke(16, 62, 100, fade); const arrow = velocity.copy().normalize().mult(p.random(2, 4)); const direction = p5.Vector.add(particle.location, arrow); p.line(particle.location.x, particle.location.y, direction.x, direction.y); }; const move = () =&gt; { particle.applyForce(p.createVector(p.random(-.2, .2), p.random(-0.1, -0.4))); particle.velocity.add(particle.acc); particle.location.add(particle.velocity.copy().normalize().mult(p.random(2, 4))); particle.acc.mult(0); fade -= 5; }; return { ...particle, draw, move } } const createParticle = (locationP, velocity) =&gt; { const acc = p.createVector(0, 0); const location = locationP.copy(); let fade = 255; const fadeMinus = p.randomGaussian(15, 2); let ligther = 100; let situate = 62; const draw = () =&gt; { p.colorMode(p.HSB) p.stroke(16, p.constrain(situate, 62, 92), p.constrain(ligther, 60, 100), fade); const arrow = velocity.copy().mult(2); const direction = p5.Vector.add(location, arrow); p.line(location.x, location.y, direction.x, direction.y); }; const move = () =&gt; { velocity.add(acc); location.add(velocity.copy().div(p.map(velocity.mag(), 18, 0, 5, 1))); acc.mult(0); fade -= fadeMinus; ligther -= 8; situate += 8; }; const applyForce = force =&gt; { acc.add(force); }; const isDead = () =&gt; { if (fade &lt; 0 || location.x &lt; 0 || location.x &gt; p.width || location.y &gt; p.height) { return true; } else { return false; } }; return { draw, move, applyForce, isDead, velocity, location, acc }; }; const createMover = () =&gt; { const location = p.createVector(p.width / 2, p.height / 2); const velocity = p.createVector(0, 0); const acc = p.createVector(0, 0); const mass = 10; let angle = 0; let angleVelocity = 0; let angleAcc = 0; let len = 100; const particleSystems = [ createParticleSystem(location), createParticleSystem(location), createParticleSystem(location), createParticleSystem(location), createParticleSystem(location), createParticleSystem(location), createParticleSystem(location), createParticleSystem(location), createParticleSystem(location) ]; const getGotoVector = angle =&gt; { const radius = p.map(angleVelocity, 0, 0.3, 0, 80); const goToVector = p.createVector( location.x + radius * p.cos(angle), location.y + radius * p.sin(angle) ); return goToVector; }; const draw = () =&gt; { const goToVector = getGotoVector(angle); particleSystems.forEach(particleSystem =&gt; { particleSystem.run(); }); }; const renderParticleSystem = () =&gt; { particleSystems.forEach(particleSystem =&gt; { const goToVector = getGotoVector(angle - p.random(0, p.TWO_PI)); const prepencular = p.createVector( (goToVector.y - location.y)*-1, (goToVector.x - location.x) ); prepencular.normalize(); prepencular.mult(angleVelocity * 70); particleSystem.origin.set(goToVector); particleSystem.addParticle(prepencular); const gravity = p.createVector(0, 0.3); particleSystem.applyForce(gravity); }); }; const move = () =&gt; { angleAcc = 0.005; angleVelocity = p.constrain(angleVelocity + angleAcc, 0, 0.32); angle += angleVelocity; angleAcc = 0; renderParticleSystem(); }; return { draw, move }; }; let mover; p.setup = function() { p.createCanvas(230, 320); p.clear(); mover = createMover(); } p.draw = function() { p.clear(); mover.move(); mover.draw(); } }; p5Instance = new p5(sketch); } // hiding and showing loading animation function hideLoadingAnimation() { console.log(&#34;Yükleme animasyonu gizleniyor, ana içerik gösteriliyor&#34;); var loadingAnimation = document.getElementById(&#34;loading-animation&#34;); var mainContent = document.getElementById(&#34;main-content&#34;); loadingAnimation.style.display = &#34;none&#34;; mainContent.style.display = &#34;block&#34;; } window.onload = function() { console.log(&#34;Sayfa tamamen yüklendi&#34;); hideLoadingAnimation(); };</code></pre> <pre><code>.card.active::before, .card.active::after { content: &#39;&#39;; position: relative; z-index: 12; display: block; height: 260px; background-color: rgb(255, 0, 0, 0.5); } .card.active::before { margin-top: -260px; } #main-content { display: none; } * { box-sizing: border-box; } body { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-flow: column wrap; background: radial-gradient(circle, rgba(7, 50, 22, 255) 0%, rgba(0, 0, 0, 255) 100%); animation: shine 4s linear infinite; color: white; font-family: &#34;Lato&#34;; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; } ul { margin: 0; padding: 0; list-style-type: none; max-width: 800px; width: 100%; margin: 0 auto; padding: 15px; text-align: center; overflow-x: hidden; } .card { float: left; position: relative; width: calc(33.33% - 30px + 9.999px); height: 340px; margin: 0 30px 30px 0; transform-style: preserve-3d; transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1); } .card:first-child .card__front { background:#5271C2; } .card__front img { width: 100%; height: 100%; object-fit: cover; } .card:first-child .card__num { text-shadow: 1px 1px rgba(52, 78, 147, 0.8) } .card:nth-child(2) .card__front { background:#35a541; } .card:nth-child(2) .card__num { text-shadow: 1px 1px rgba(34, 107, 42, 0.8); } .card:nth-child(3) { margin-right: 0; } .card:nth-child(3) .card__front { background: #bdb235; } .card:nth-child(3) .card__num { text-shadow: 1px 1px rgba(129, 122, 36, 0.8); } .card:nth-child(4) .card__front { background: #db6623; } .card:nth-child(4) .card__num { text-shadow: 1px 1px rgba(153, 71, 24, 0.8); } .card:nth-child(5) .card__front { background: #3e5eb3; } .card:nth-child(5) .card__num { text-shadow: 1px 1px rgba(42, 64, 122, 0.8); } .card:nth-child(6) .card__front { background: #aa9e5c; } .card:nth-child(6) .card__num { text-shadow: 1px 1px rgba(122, 113, 64, 0.8); } .card:last-child { margin-right: 0; } .card__flipper { cursor: pointer; border: 3.5px solid rgba(255, 215, 0, 0.6); background-image: linear-gradient(45deg, rgba(255, 215, 0, 0.5), transparent, rgba(255, 215, 0, 0.5)); transform-style: preserve-3d; transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1); } .card__front, .card__back { position: absolute; backface-visibility: hidden; top: 0; left: 0; width: 100%; height: 340px; } .card__front { transform: rotateY(0); z-index: 2; overflow: hidden; } .card__back { transform: rotateY(180deg) scale(1.1); background: linear-gradient(45deg, #483D8B, #301934, #483D8B, #301934); display: flex; flex-flow: column wrap; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); } .card__back span { font-weight: bold; /* Metni kalın yap */ color: white; /* Beyaz renk */ font-size: 16px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .card__name { font-size: 32px; line-height: 0.9; font-weight: 700; } .card__name span { font-size: 14px; } .card__num { font-size: 100px; margin: 0 8px 0 0; font-weight: 700; } @media (max-width: 700px) { .card__num { font-size: 70px; } } @media (max-width: 700px) { .card { width: 100%; height: 290px; margin-right: 0; float: none; } .card .card__front, .card .card__back { height: 290px; overflow: hidden; } } /* Demo */ main { text-align: center; } main h1, main p { margin: 0 0 12px 0; } main h1 { margin-top: 12px; font-weight: 300; } .fa-github { color: white; font-size: 50px; margin-top: 8px; } .tm-container { display: flex; justify-content: center; align-items: center; } .tm-letter { display:inline-block; font-size:30px; margin: 0 5px; margin-top: 10px; opacity: 0; transform: translateY(0); animation: letter-animation 6s ease-in-out infinite; } @keyframes letter-animation { 0%, 100% { opacity: 1; transform: translateY(0); } 10%, 40%, 60%, 90% { opacity: 1; transform: translateY(-10px); } 20%, 80% { opacity: 1; transform: translateY(0); } } #m-letter { animation-delay: 1.5s; } a { position: relative; display: inline-block; padding: 0px; } a::before { content: &#39;&#39;; position: absolute; top: 50%; /* Orta konumu */ left: 50%; /* Orta konumu */ transform: translate(-50%, -50%); width: 50px; height: 45px; border-radius: 50%; /* Eğer bir daire şeklinde efekt isteniyorsa */ box-shadow: 0 0 8px 4px rgba(110, 110, 110, 0.8); filter: blur(4px) brightness(1.5); / opacity: 0; transition: opacity 0.3s ease, transform 0.3s ease; z-index: -1; } a:hover::before { opacity: 1; } body.hoverEffect { background: radial-gradient(circle at center, #000000, #000033, #000066, #1a1a1a); } #gameCard { width: 300px; height: 450px; margin: 50px auto; padding: 20px; border-radius: 15px; box-shadow: 0 0 50px 10px #FFD700, 0 0 100px 20px #0000FF, 0 0 150px 30px #000033; background: rgba(0,0,0,0.7); color:#FFD700; text-align: center; border: 3px solid #FFD700; } #gameCardLink span { font-size: 18px; margin-right: 5px; font-weight: bold; } #gameCardLink span:last-child { font-size: 0.79em; vertical-align: super; opacity: 0.9; font-weight: bold; text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5); } #loading-animation { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-image:url(&#39;data:image/jpeg;base64,/); background-repeat: no-repeat; background-size: cover ; display: flex; justify-content: center; align-items: center; z-index: 9999; } .loader { border-top: 9px solid #00a2ed; border-radius: 80%; width: 12vw; height: 12vw; animation: spin 2s linear infinite; position: absolute; left: 44%; top: 46%; / transform: translate(-50%, -50%) rotate(0deg); /* Yuvarlak halkanın tam ortasında olması için bu dönüşümü kullanın. */ } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }</code></pre> <pre><code>&lt;script src=&#34;https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js&#34;&gt;&lt;/script&gt; &lt;script src=&#34;https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js&#34;&gt;&lt;/script&gt; &lt;link rel=&#34;stylesheet&#34; href=&#34;https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css&#34;&gt; &lt;div id=&#34;loading-animation&#34;&gt; &lt;div class=&#34;loader&#34;&gt;&lt;/div&gt; &lt;/div&gt; &lt;div id=&#34;main-content&#34;&gt; &lt;div class=&#34;tm-container&#34;&gt; &lt;div class=&#34;tm-letter&#34; id=&#34;t-letter&#34;&gt;T&lt;/div&gt; &lt;div class=&#34;tm-letter&#34; id=&#34;m-letter&#34;&gt;M&lt;/div&gt; &lt;/div&gt; &lt;audio id=&#34;flipSound&#34; preload=&#34;auto&#34;&gt; &lt;source src=&#34;https://cdn.freesound.org/previews/321/321114_2776777-lq.ogg&#34; type=&#34;audio/wav&#34;&gt; &lt;/audio&gt; &lt;main&gt; &lt;div id=&#34;gameCardLink&#34;&gt; &lt;span&gt;G&lt;/span&gt; &lt;span&gt;a&lt;/span&gt; &lt;span&gt;m&lt;/span&gt; &lt;span&gt;e&lt;/span&gt; &lt;span&gt; &lt;/span&gt; &lt;!-- Boşluk eklemek için span ekledik --&gt; &lt;span&gt; &lt;/span&gt; &lt;span&gt;C&lt;/span&gt; &lt;span&gt; &lt;/span&gt; &lt;span&gt;a&lt;/span&gt; &lt;span&gt; &lt;/span&gt; &lt;span&gt;r&lt;/span&gt; &lt;span&gt; &lt;/span&gt; &lt;span&gt;d&lt;/span&gt; &lt;span&gt; &lt;/span&gt; &lt;span&gt;s&lt;/span&gt; &lt;span&gt;®&lt;/span&gt; &lt;/div&gt; &lt;p&gt;&lt;a href=&#34;https://github.com/murattasci06&#34;&gt;&lt;i class=&#34;fab fa-github&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/p&gt; &lt;/main&gt; &lt;ul&gt; &lt;li class=&#34;card&#34; &gt; &lt;div class=&#34;card__flipper&#34;&gt; &lt;div class=&#34;card__front&#34;&gt; &lt;img src=&#34;https://gecbunlari.com/wp-content/uploads/2021/12/Spiderman-No-Way-Home.jpg&#34; alt=&#34;Spiderman&#34;&gt; &lt;p class=&#34;card__name&#34;&gt;&lt;span&gt;Marvel&lt;/span&gt;&lt;br&gt;Spiderman&lt;/p&gt; &lt;p class=&#34;card__num&#34;&gt;1&lt;/p&gt; &lt;/div&gt; &lt;iframe class=&#34;frame&#34; width=&#34;225&#34; height=&#34;340&#34; src=&#34;https://www.youtube.com/embed/JfVOs4VSpmA?autoplay=1&amp;mute=1&amp;vq=hd1080&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen&gt;&lt;/iframe&gt; &lt;div class=&#34;card__back&#34;&gt; &lt;svg height=&#34;180&#34; width=&#34;180&#34;&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;65&#34; stroke=&#34;#514d9b&#34; stroke-width=&#34;35&#34; /&gt; &lt;!-- Dış dairenin kenarı (yeşil) --&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;83&#34; fill=&#34;none&#34; stroke=&#34;rgba(7, 50, 22, 255)&#34; stroke-width=&#34;1&#34; /&gt; &lt;/svg&gt; &lt;span&gt;1.89 Bil. $&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class=&#34;card&#34;&gt; &lt;div class=&#34;card__flipper&#34;&gt; &lt;div class=&#34;card__front&#34;&gt; &lt;img src=&#34;https://i.pinimg.com/736x/1e/f1/3d/1ef13dfa4b7b8c131302e242d1ec48d7.jpg&#34; alt=&#34;Batman&#34;&gt; &lt;p class=&#34;card__name&#34;&gt;&lt;span&gt;DC&lt;/span&gt;&lt;br&gt;Batman&lt;/p&gt; &lt;p class=&#34;card__num&#34;&gt;2&lt;/p&gt; &lt;/div&gt; &lt;iframe class=&#34;frame&#34; width=&#34;225&#34; height=&#34;340&#34; src=&#34;https://www.youtube.com/embed/mqqft2x_Aa4?autoplay=1&amp;mute=1&amp;vq=hd1080&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen&gt;&lt;/iframe&gt; &lt;div class=&#34;card__back&#34;&gt; &lt;svg height=&#34;180&#34; width=&#34;180&#34;&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;65&#34; stroke=&#34;#35a541&#34; stroke-width=&#34;35&#34;/&gt; &lt;!-- Dış dairenin kenarı (yeşil) --&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;83&#34; fill=&#34;none&#34; stroke=&#34;rgba(7, 50, 22, 255)&#34; stroke-width=&#34;1&#34; /&gt; &lt;/svg&gt; &lt;span&gt;771 Mil. $&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class=&#34;card&#34;&gt; &lt;div class=&#34;card__flipper&#34;&gt; &lt;div class=&#34;card__front&#34;&gt; &lt;img src=&#34;https://wallpapercave.com/wp/wp12279011.jpg&#34; alt=&#34;Guardians_of_the_Galaxy_Vol_3&#34;&gt; &lt;p class=&#34;card__name&#34;&gt;&lt;span&gt;Marvel&lt;/span&gt;&lt;br&gt;Guardians_of_the_Galaxy_Vol_3&lt;/p&gt; &lt;p class=&#34;card__num&#34;&gt;3&lt;/p&gt; &lt;/div&gt; &lt;iframe class=&#34;frame&#34; width=&#34;225&#34; height=&#34;340&#34; src=&#34;https://www.youtube.com/embed/u3V5KDHRQvk?autoplay=1&amp;mute=1&amp;vq=hd1080&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen &gt;&lt;/iframe&gt; &lt;div class=&#34;card__back&#34;&gt; &lt;svg height=&#34;180&#34; width=&#34;180&#34;&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;65&#34; stroke=&#34;#bdb235&#34; stroke-width=&#34;35&#34;/&gt; &lt;!-- Dış dairenin kenarı (yeşil) --&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;83&#34; fill=&#34;none&#34; stroke=&#34;rgba(7, 50, 22, 255)&#34; stroke-width=&#34;1&#34; /&gt; &lt;/svg&gt; &lt;span&gt;845.4 Mil. $&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class=&#34;card&#34;&gt; &lt;div class=&#34;card__flipper&#34;&gt; &lt;div class=&#34;card__front&#34;&gt; &lt;img src=&#34;https://wallpaperaccess.com/full/8940499.jpg&#34; alt=&#34;Shazam&#34;&gt; &lt;p class=&#34;card__name&#34;&gt;&lt;span&gt;DC&lt;/span&gt;&lt;br&gt;Shazam2&lt;/p&gt; &lt;p class=&#34;card__num&#34;&gt;4&lt;/p&gt; &lt;/div&gt; &lt;iframe class=&#34;frame&#34; width=&#34;225&#34; height=&#34;340&#34; src=&#34;https://www.youtube.com/embed/AIc671o9yCI?autoplay=1&amp;mute=1&amp;vq=hd1080&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen &gt;&lt;/iframe&gt; &lt;div class=&#34;card__back&#34;&gt; &lt;svg height=&#34;180&#34; width=&#34;180&#34;&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;65&#34; stroke=&#34;#db6623&#34; stroke-width=&#34;35&#34;/&gt; &lt;!-- Dış dairenin kenarı (yeşil) --&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;83&#34; fill=&#34;none&#34; stroke=&#34;rgba(7, 50, 22, 255)&#34; stroke-width=&#34;1&#34; /&gt; &lt;/svg&gt; &lt;span&gt;462.5 Mil. $&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class=&#34;card&#34;&gt; &lt;div class=&#34;card__flipper&#34;&gt; &lt;div class=&#34;card__front&#34;&gt; &lt;img src=&#34;https://images2.alphacoders.com/131/1316679.jpeg&#34; alt=&#34;Flash&#34;&gt; &lt;p class=&#34;card__name&#34;&gt;&lt;span&gt;DC&lt;/span&gt;&lt;br&gt;Flash&lt;/p&gt; &lt;p class=&#34;card__num&#34;&gt;5&lt;/p&gt; &lt;/div&gt; &lt;iframe class=&#34;frame&#34; width=&#34;225&#34; height=&#34;340&#34; src=&#34;https://www.youtube.com/embed/hebWYacbdvc?autoplay=1&amp;mute=1&amp;vq=hd1080&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen &gt;&lt;/iframe&gt; &lt;div class=&#34;card__back&#34;&gt; &lt;svg height=&#34;180&#34; width=&#34;180&#34;&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;65&#34; stroke=&#34;#3e5eb3&#34; stroke-width=&#34;35&#34;/&gt; &lt;!-- Dış dairenin kenarı (yeşil) --&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;83&#34; fill=&#34;none&#34; stroke=&#34;rgba(7, 50, 22, 255)&#34; stroke-width=&#34;1&#34; /&gt; &lt;/svg&gt; &lt;span&gt;560.2 Mil. $&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class=&#34;card&#34;&gt; &lt;div class=&#34;card__flipper&#34;&gt; &lt;div class=&#34;card__front&#34;&gt; &lt;img src=&#34; https://images3.alphacoders.com/121/1213553.jpg&#34; alt=&#34;Dr_Strange_2&#34;&gt; &lt;p class=&#34;card__name&#34;&gt;&lt;span&gt;Marvel&lt;/span&gt;&lt;br&gt;Dr_Strange_2&lt;/p&gt; &lt;p class=&#34;card__num&#34;&gt;6&lt;/p&gt; &lt;/div&gt; &lt;iframe class=&#34;frame&#34; width=&#34;225&#34; height=&#34;340&#34; src=&#34;https://www.youtube.com/embed/aWzlQ2N6qqg?autoplay=1&amp;mute=1&amp;vq=hd1080&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen &gt;&lt;/iframe&gt; &lt;div class=&#34;card__back&#34;&gt; &lt;svg height=&#34;180&#34; width=&#34;180&#34;&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;65&#34; stroke=&#34;#aa9e5c&#34; stroke-width=&#34;35&#34;/&gt; &lt;!-- Dış dairenin kenarı (yeşil) --&gt; &lt;circle cx=&#34;90&#34; cy=&#34;90&#34; r=&#34;83&#34; fill=&#34;none&#34; stroke=&#34;rgba(7, 50, 22, 255)&#34; stroke-width=&#34;1&#34; /&gt; &lt;/svg&gt; &lt;span&gt;955.8 Mil. $&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;</code></pre> </div> </div> <p></p> </answer> </body></html>

回答 0 投票 0

Google Maps API for React

我的错误的屏幕截图我一直在尝试在我的 Visual Studio 代码编辑器中使用 npm install @vis.gl/react-google-maps 安装 google 地图 API,但最终收到此错误 - 在行:1 字符:13...

回答 1 投票 0

如何用I18Next返回JSX对象?

问题是当我尝试返回此字符串中的 NavLink 元素时,这是我的元素以及我期望带有链接的字符串。 const termsOfUseLink = ( 问题是当我尝试返回此字符串中的 NavLink 元素时,这是我的元素以及我期望带有链接的字符串。 const termsOfUseLink = ( <NavLink to="/terms-of-use" target="_blank"> {t("exchange.checkbox1-links.termsOfUse")} </NavLink> ); const howItWorksLink = ( <NavLink to="/how-its-work" target="_blank"> {t("exchange.checkbox1-links.howItWorks")} </NavLink> ); const privacyPolicyLink = ( <NavLink to="/privacy-policy" target="_blank"> {t("exchange.checkbox1-links.privacyPolicy")} </NavLink> ); // in return {t("exchange.checkbox1", { returnObjects: true, termsOfUseLink: termsOfUseLink, howItWorksLink: howItWorksLink, privacyPolicyLink: privacyPolicyLink, })} 我有这个带翻译的 JSON 文件: "checkbox1": "I agree with {{termsOfUseLink}} and {{howItWorksLink}} and {{privacyPolicyLink}}", "checkbox1-links": { "termsOfUse": "Terms of Use", "howItWorks": "How it works", "privacyPolicy": "Privacy Policy" }, 当双括号时,它返回 [object Object],当单括号时,我得到相同的字符串,如 checkbox1 值中所示。 那么有没有办法在I18Next中显示这些链接呢? 我认为解决此问题的最佳方法不是翻译您拥有的整个“checkbox1”行,而是仅引用退货内部的链接,然后翻译其他单独的文本。 return (<p> {t("exchange.iAgreeWith")} {termsOfUseLink} {t("exchange.and")} {howItWorksLink} {t("exchange.and")} {privacyPolicyLink } </p> Json 文件: "iAgreeWith": "I agree with", "and" : "and" "checkbox1-links": { "termsOfUse": "Terms of Use", "howItWorks": "How it works", "privacyPolicy": "Privacy Policy" },

回答 1 投票 0

如何使用 Angular 的 GSAP 且不影响性能

我需要将GSAP(绿袜子动画)与角度应用程序一起使用,而不是影响应用程序性能或改变生命周期。不过,另一方面,我需要它来开始创作......

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.