css

CSS - how do I make a 1/4 circle that is 100vh?

烈酒焚心 提交于 2021-02-10 07:08:50
问题 I want something like this (the pink circle): CSS quarter circle 100vh example. So far, I have a half-circle (see CSS below), but when I try to make it 100vh, it stretches and I can't figure out how to keep it proportional. .circle { height: 180px; width: 90px; border-radius: 0 90px 90px 0; -moz-border-radius: 0 90px 90px 0; -webkit-border-radius: 0 90px 90px 0; background: red; margin: 100px; position: absolute;} Any insights greatly appreciated. Thanks 回答1: I modified the code to only use

CSS - how do I make a 1/4 circle that is 100vh?

假如想象 提交于 2021-02-10 07:07:50
问题 I want something like this (the pink circle): CSS quarter circle 100vh example. So far, I have a half-circle (see CSS below), but when I try to make it 100vh, it stretches and I can't figure out how to keep it proportional. .circle { height: 180px; width: 90px; border-radius: 0 90px 90px 0; -moz-border-radius: 0 90px 90px 0; -webkit-border-radius: 0 90px 90px 0; background: red; margin: 100px; position: absolute;} Any insights greatly appreciated. Thanks 回答1: I modified the code to only use

“for” attribute not working inside button for Firefox

你说的曾经没有我的故事 提交于 2021-02-10 06:57:13
问题 I want to customize the input element by changing the text to "Choose file ..." and hide the file's name. Also if a user click the button a window is opened for user to choose file. The code is <button> <label for="upload"> Choose file ... </label> </button> <input type="file" id="upload" style="display:none"> With Chrome, if I click the button a window is popped up for me to choose the file. However it doesn't work with Firefox and IE. Do you know how can I make it work for all three

Change color of selected link in angular 4 [duplicate]

血红的双手。 提交于 2021-02-10 06:47:57
问题 This question already has answers here : How to set Bootstrap navbar “active” class in Angular 2? (11 answers) Closed 2 years ago . I made a header using bootstrap 4 but I want that when I click on any link, link change its color and remains selected. <nav> <div class="collapse navbar-collapse justify-content-end" id="nav-content"> <ul class="navbar-nav" id="nav"> <li class="nav-item"> <a class="nav-link" routerLink="">About</a> </li> <li class="nav-item"> <a class="nav-link" routerLink="

Is it possible to stop propagation by CSS?

情到浓时终转凉″ 提交于 2021-02-10 06:46:06
问题 With Javascript it is possible to stop propagation with code? E.g. function func1(event) { alert("DIV 1"); if (document.getElementById("check").checked) { event.stopPropagation(); } } Is it also possible to stop propagation by CSS? 回答1: Sort-of, in some browsers. You can use the 'all' property to reset an element back to initial values. That should mean the initial values inherit down from there. Unfortunately it's not supported by IE and Edge though. https://www.caniuse.com/#search=all 来源:

Relation between grid-template-areas and grid-template columns

喜欢而已 提交于 2021-02-10 06:42:16
问题 I am new to coding and don't seem to understand the CSS Grid model correctly. In the code below the grid is divided into 3 grid-template-columns (300px each) but then there are 8 units per row in the grid-template-areas (for example: hd hd hd hd hd hd hd hd) and not 3 which does not make sense to me. Can somebody please help me understand why the number of units in the grid-template-area is not the same as the number of columns? (so it would be "hd hd hd" if there are 3 columns). What is

Relation between grid-template-areas and grid-template columns

扶醉桌前 提交于 2021-02-10 06:39:27
问题 I am new to coding and don't seem to understand the CSS Grid model correctly. In the code below the grid is divided into 3 grid-template-columns (300px each) but then there are 8 units per row in the grid-template-areas (for example: hd hd hd hd hd hd hd hd) and not 3 which does not make sense to me. Can somebody please help me understand why the number of units in the grid-template-area is not the same as the number of columns? (so it would be "hd hd hd" if there are 3 columns). What is

Bootstrap 4 SCSS compilation: Error: Invalid US-ASCII character “\xE2”

别等时光非礼了梦想. 提交于 2021-02-10 06:39:07
问题 Having issues compiling some bootstrap 4 modules (updating from beta3). While the issue can be solved by setting @charset: 'UTF-8'; on _hover.scss mixin partial (which is noted as deprecated within the file), why would that be needed considering it should compile out of the box as previous beta versions. Code in _hover.scss : @mixin hover { &:hover { @content; } } @mixin hover-focus { &:hover, &:focus { @content; } } @mixin plain-hover-focus { &, &:hover, &:focus { @content; } } @mixin hover

Is it possible to style a substring in CSS?

和自甴很熟 提交于 2021-02-10 06:37:06
问题 I want to emphasise the last 3 characters of a string, example: 123456 789 Easy to wrap the last three with <strong> or <span class=""> , but I was wondering if it could be done with CSS only? So the html would be something like: <span class="mytext">123456789</span> With the emphasis added in CSS mytext class? 回答1: Here is a crazy idea using filter and SVG to simulate a bold effect on the last 3 digits. Works only on chrome .mytext { display: inline-block; margin: 10px; font-size: 50px; font

SVG animation is not working in Edge or IE

穿精又带淫゛_ 提交于 2021-02-10 06:34:05
问题 I have a checkmark SVG animation that works in Safari, Chrome, Firefox, etc but does not work in Edge and IE (surprise surprise). It seems as if the SVG is there but the strokes are not displaying. As far as I can tell both Edge and IE11 support what I am trying to do and I've used every prefix I can think of. CSS/HTML: .checkmark { position: relative; left: 50px; z-index: 1; opacity: 1; width: 22px; border-radius: 50%; display: inline; stroke-width: 6; stroke: #fff; stroke-miterlimit: 10;