css

Can't get @fontface CSS to work in WordPress

时光总嘲笑我的痴心妄想 提交于 2021-02-11 12:33:52
问题 I'm pretty sure this is what I've always done in the past, but I can't get it to work this time. The folder AFONTNAME is in the fonts folder within the active theme folder: @font-face { font-family: "A Font Name"; src: url("/fonts/AFONTNAME/AFONTNAME.ttf") format("ttf"), url("/fonts/AFONTNAME/AFONTNAME.woff") format("woff"), url("/fonts/AFONTNAME/AFONTNAME.svg") format("svg"); } .specialfont { font-family: "A Font Name" } Have tried using the full path to the fonts folder, with and without

How do I integrate a JS animation code in React application

↘锁芯ラ 提交于 2021-02-11 12:32:23
问题 I am looking to integrate motion animation as my background in my React project. I'm trying to add a firefly animation into a component within react (and the code I'm trying to use is here https://codepen.io/celli/pen/xZgpvN ). function App() { return <Background total={25} / > } ReactDOM.render( <App / > , document.querySelector("#container")) <div id="container" /> <!-- React --> <script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.8.4/umd/react.production.min.js"></script> <script

Keep cursor grabbing between list. @angluar/cdk/drag-drop

荒凉一梦 提交于 2021-02-11 12:32:19
问题 I have this example in stackblitz. I use @angular/cdk/drag-drop in my project. I try to change the cursor to cursor:grabb and cursor:grabbing when the cursor is up an element and when I drag a picked element. I use this line: .example-box:active { cursor:grabbing } But its not working. What's I need to do? 回答1: I know it's has been a while, but I found a solution to the issue! first add this global CSS: body.inheritCursors * { cursor: inherit !important; } and to your cdkDrag element add

Responsive Layout when using grid

假装没事ソ 提交于 2021-02-11 12:30:09
问题 The website is designed to have 6 big squares, 3 per row, in a grid layout. I am trying to make it responsive, so if someone zooms the website would adapt... and it kind of does, but in a bad way. I want the squares to lay different when zooming; If now they are 3 per row I want them to go 2 per row and finally 1 per row if zooming enough. Instead of that the squares narrow themselves in their width in order to fit. /*///////////GENERAL//////////*/ * { margin: 0px; padding: 0px; box-sizing:

set keyframe animation, inline in React

廉价感情. 提交于 2021-02-11 12:29:06
问题 Codesandbox as always: https://codesandbox.io/s/busy-leaf-onnqq I have a react class that renders sets of divs, which contain inner divs with values set by values associated with indices in a JSON array. Currently, I am scaling divs using translate: import React, { Component } from "react"; import "./Maps.css"; import df3 from "./data/df3.json"; class Maps extends Component { constructor() { super(); const data = df3; this.state = data; } renderDiv = () => { var df4 = df3["Devotions"];

Javascript - need an image to disappear momentarily while the the other image transitions

天涯浪子 提交于 2021-02-11 12:23:47
问题 **Hi, fellow Developers! I'm in bit of a rut. I am currently working on making an image fade and transition to another image using Javascript. I'm new to code (and stackoverlow) and am still learning how to program - how can I can make the images fade without being apparent in the background? What I expected the code to do was fade, transition to the second image, and repeat. It Here is what the code looks like so far.** ======HTML CODE===== <!DOCTYPE html> <html lang="en"> <head> <meta

Dropdown working with Bootstrap 4 not working with Bootstrap 5

孤者浪人 提交于 2021-02-11 12:22:22
问题 I am working on building Multi-level(second level) drop-down. The Drop-down works on Bootstrap-js version 4. But the drop-down not working in Bootstrap-5-beta. The Working Bootstrap 4 version is provided here. However, the Bootstrap-5-beta jsfiddle version the drop-downs not working with Bootstrap 5 Js. The dropdown Works as I change bootstrap-5-js to bootstrap-4-js Am I missing a class with jquery selector, any help would be appreciated. Edit : Although both the answers works fine, but the

The font-size property on iphone “landscape” seems larger?

心不动则不痛 提交于 2021-02-11 12:19:30
问题 I don't understand why the font-size property on iPhone "landscape" seems larger than portrait or desktop browser... I have for body font-size: 100% and for text inside image 17px PORTRAIT LANDSCAPE I assure that in landscape version text seems larger. 回答1: Include this to your site: body { -webkit-text-size-adjust: none; } 来源: https://stackoverflow.com/questions/53103444/the-font-size-property-on-iphone-landscape-seems-larger

Set CSS variables from model object in Thymeleaf

橙三吉。 提交于 2021-02-11 12:17:25
问题 I'm setting CSS color variables inside a style tag in a Thymeleaf template. The color values are coming from the model object. I also want to apply a default color, in case the model attirbute is not there. But when I render the template, Thymeleaf doesn't evaluate the expression, but assigns the entire expression as a string literal, instead of the color value. Below is my style tag. I've done the same thing in Apache Freemarker, and it worked fine. I'm pretty new to Thymeleaf, what should I

How to use getElementsByClassName() for adding both grids and display one after another?

♀尐吖头ヾ 提交于 2021-02-11 12:13:22
问题 I Have Tried to add grid-2 when we press a key, but it's not working as I expected. When it is displaying grid-2 I want the grid to disappear (I don't know how to do). (background):- I have searched and found there is a visibility property in CSS, but don't know how to apply to the whole grid and undo the visibility property and make them visible. I have tried to add the grid-2 by getElementById but both the grids are appearing at a time. (don't know how to make them appear one after another)