我的 laravel 上有两个独立的文件,一个是 index.blade.php ,一个是 .js 文件。刀片上有一根绳子,像这样:
<p id="currentMessage" class="bold-700"></p>
Run Code Online (Sandbox Code Playgroud)
在我的 JS 中我有:
$(document).ready(function() {
$('#currentMessage').text("@lang('hello'));
});
Run Code Online (Sandbox Code Playgroud)
似乎它不会在运行时翻译,我无法注入文本并等待它被翻译,但是有什么方法可以在发送之前在 jquery 上翻译字符串或其他方法来解决这个问题?
我试图在 SVG 内的分组路径中应用阴影,就像 css 中的框阴影一样,尝试box-shadow: 2px 2px 13px 0 var(rgba(0, 0, 0, 0.3));在悬停时应用一个类,但它不起作用,还尝试了一个过滤器,例如:
<filter id="dropshadow" x="-2" y="-2" width="300" height="300">
<feGaussianBlur stdDeviation="1"/>
</filter>
Run Code Online (Sandbox Code Playgroud)
然后添加到悬停该过滤器的路径,但仍然不起作用
filter: url('#dropshadow');
Run Code Online (Sandbox Code Playgroud)
关于如何实现这一目标有什么想法吗?这是jsfiddle
编辑:已经能够创建一个可以使用以下命令显示的阴影:
<filter id="selective-shadow">
<feColorMatrix type="matrix" values="0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
2 0 0 0 -1"/>
<feGaussianBlur stdDeviation="3"/>
<feOffset dy="0" dx="0"/>
<feMerge>
<feMergeNode/>
<feMergeNode in="SourceGraphic"/>
</feMerge>
</filter>
Run Code Online (Sandbox Code Playgroud)
现在在我的 CSS 上,我尝试同时使用我的悬停效果 + 阴影效果,但它不起作用:
path {
fill: #e5e5e5;
}
path:hover {
stroke: #f4f6f9;
stroke-width:2px; …Run Code Online (Sandbox Code Playgroud)