css

Hover on “everything but” aka “spotlight” effect: how to make smooth & easy hover transitions?

旧时模样 提交于 2021-02-19 05:56:25
问题 Chris Coyier once posted an article on CSS-Tricks website on how to achieve this effect: ul:hover li:not(:hover) { opacity: .5; } But what I'm also trying to achieve is smooth and easy hover transitions. I'm just not sure how or where to insert the "smooth hover transition" part of the code. a { color: #cccccc; -webkit-transition: color .5s linear; -moz-transition: color .5s linear; -ms-transition: color .5s linear; -o-transition: color .5s linear; transition: color .5s linear; } a:hover {

Why is my sidebar being pushed below content?

醉酒当歌 提交于 2021-02-19 05:38:05
问题 I am trying to setup a template with HTML and CSS and I am having trouble with my sidebar. It seems to be getting pushed below my content although it is to the left like it should be. I can't figure out why? Does anyone have any suggestions? Example: http://jsfiddle.net/zDdfn/ HTML: <head> <title>working</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <div id="banner"> </div> <!-- End banner div --> <div id="navcontainer"> <ul id="navlist

Responsive Design Pixels vs percentages

夙愿已清 提交于 2021-02-19 05:28:27
问题 I'm hoping someone can help. I'm recently watched a video on responsive web design on a well know site. I'm puzzled by the method taken by the tutor. He basically creates three styles sheets (large / medium / small) and in each stylesheet he gives the PX widths of DIVS and swaps images where necessary. Surely, this method is flawed , he could just use percentages for fluid layout instead of different styles sheets called via media queries?? Is there any advantages to his method? many thanks,

Drop Down menu hidden when put inside div with overflow auto

天大地大妈咪最大 提交于 2021-02-19 05:18:27
问题 I have a dropdown menu inside a div container with overflow-x: auto , the problem that whenever I add the overflow property to the container to enable the horizontal scrolling you need to scroll vertically to see the dropped menu !!which is not what I want, is there a solution to make the dropdown menu overlap it's container with keeping the ability to scroll the navbar horizontally inside it's container ? GIF of the Issue : Another GIF without overflow which solve the problem but disable the

How can I vertically center rotated text using Flexbox layout?

独自空忆成欢 提交于 2021-02-19 05:05:21
问题 How can I vertically center rotated text using flexbox layout? I want something that looks like this: Here's what I have so far: html, body { height: 100%; } body { background-color: #efefef; } body > div { align-content: center; background-color: white; border: 1px solid black; display: flex; height: 100%; width: 25px; } body > div > div { flex: 1; transform: rotate(-90deg); } <div> <div> Where did I go? </div> </div> 回答1: Add white-space: nowrap and center horizontally and vertically using:

How can I vertically center rotated text using Flexbox layout?

我是研究僧i 提交于 2021-02-19 05:05:09
问题 How can I vertically center rotated text using flexbox layout? I want something that looks like this: Here's what I have so far: html, body { height: 100%; } body { background-color: #efefef; } body > div { align-content: center; background-color: white; border: 1px solid black; display: flex; height: 100%; width: 25px; } body > div > div { flex: 1; transform: rotate(-90deg); } <div> <div> Where did I go? </div> </div> 回答1: Add white-space: nowrap and center horizontally and vertically using:

Issues with Absolute Positioning of Div in Mobile Browser

我怕爱的太早我们不能终老 提交于 2021-02-19 04:48:12
问题 I am having a lot of issues absolutely positioning a div called id="verticalGenesis" on the following website: http://genesispetaluma.com/index.html in a mobile browser, including both Safari and Chrome on the iPhone. I ideally am trying to position a logo to appear at the right of my screen using the following css: #verticalGenesis { background-image: url("../img/Genesis%20Text.gif"); background-repeat: no-repeat; display: block; height: 570px; opacity: 0.8; position: absolute; right: 3%;

How to precisely find thumb position of input [type=“range”]?

∥☆過路亽.° 提交于 2021-02-19 04:26:09
问题 The idea was to put a tooltip with value related to slider. I thought initially to accomplish that task by using css grid . CSS provides you with grid of any size, 10 or 1000 cols, doesn't matter. By utilizing grid functionality, we can align out tooltip as we wish. What we really get is: Thumb position is sort of unpredictable. It seems that it is being offset, and the direction of that offset is dependent on whether input value is in the left or right part of slider. Note: default thumb

CSS Animation Fade In pause… Fade Out

耗尽温柔 提交于 2021-02-19 04:05:00
问题 I’m trying to get some (will be images) blocks to fade in pause for a few seconds and then fade out.... I’ve got it so far but it doesn’t seem to want to stay faded out and i’m unsure where i’m going wrong. After its faded out it then shows up again. I have a fiddle which shows it very basicly. /* Defines the animation keyframes */ @-webkit-keyframes fadein { 0% { opacity: 0; } 72% { opacity: 0; } 100% { opacity: 1; } } @-moz-keyframes fadein { 0% { opacity: 0; } 72% { opacity: 0; } 100% {

Combine clipPath, pattern, and linearGradient in SVG

蓝咒 提交于 2021-02-19 03:56:50
问题 I am trying to create a background that consists of multiple dots gradienting from say green to yellow from left to right. So they idea was to create a path, fill it with a gradient and clip path with a pattern: https://codepen.io/Deka87/pen/pLPqJE?editors=1000 <svg width='100' height='100' viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <linearGradient id="img-dotted-gradient"> <stop offset="0%" stop-color="green"></stop> <stop