Haii could Any one help me I'm trying to make progress bar vertically. but it show in horizontally.
<v-progress-linear class="bar" :value="20"></v-progress-linear>
.bar
{
width:100%;
display:block;
font-family:arial;
font-size:12px;
background-color:#bb9319;
color:#fff;
position:absolute;
bottom:0;
}
You can add the css property transform: rotate(90deg); or transform: rotate(-90deg); depending on if you want the progress bar to progress up or down
Related
I have a small issue about css3 and trapeze. I have two square images side by side (float left each - white dots) and I want them to look like this :
How would you do it? Is it possible?
If the pic1 is a .png and the negative space created by the angle of the trapeze edge is transparent, then this should work:
#pic1, #pic2 {
float: left;
position: relative;
}
#pic1 {
z-index: 2;
}
#pic2 {
right: 30px; /* Or whatever the difference in image sizes is */
}
You can use the CSS triangle trick with the transparent borders
html
<div class="pic pic-1">Pic 1</div>
<div class="pic pic-2">Pic 2</div>
css
.pic{
width:100px;
height:100px;
float:left;
text-align:center;
line-height:100px;
color:white;
position:relative;
}
.pic-1{
background:orange;
}
.pic-2{
background:limegreen;
}
.pic:after{
content:'';
display:block;
position:absolute;
height:0;
width:0;
z-index:10;
}
.pic-1:after{
top:0;
right:-10px; /* must match the border left */
border-left: 10px solid orange; /*play with width to change angle*/
border-bottom:50px solid transparent;
}
.pic-2:after{
bottom:0;
left:-10px; /* must match the border right*/
border-right: 10px solid limegreen;/*play with width to change angle*/
border-top:50px solid transparent;
}
Demo at http://jsfiddle.net/gaby/eh2f3/
First of all you begin setting a strip that will cut alogn the top and botom borders, and where you will place the images:
.demo1 {
overflow-y: hidden;
}
Inside, there will be the base elements, that are floated left,
.base {
width: 100px;
height: 100px;
float: left;
}
Inside, a clipping element rotated:
.demo1 .clip {-webkit-transform: rotate(15deg);}
.clip {
height: 177%;
width: 125%;
margin-top: -40%;
-webkit-transform-origin: 0% 50%;
overflow: hidden
}
and inside, the image, counter-rotated
.demo1 .inner {
-webkit-transform: rotate(-15deg);
}
.inner {
-webkit-transform-origin: 0% 50%;
margin-left: -151%;
margin-top: 19%;
}
The html is :
WEBKITTED DEMO
webkitted means that only webkit prefixes are used :-)
Since somebody out there was offering 1 milliion points, I decided to do an extra effort. See the second strip (demo2) where the rotations are specified thru nth-child(). That allows to get different angles for every transition.
Full CSS :
.demo1, .demo2 {
overflow-y: hidden;
}
.base {
width: 100px;
height: 100px;
float; left;
}
.clip {height: 177%; width: 125%; margin-top: -40%;-webkit-transform-origin: 0% 50%; overflow: hidden}
.inner {-webkit-transform-origin: 0% 50%;margin-left: -151%;margin-top: 19%;}
.terminator {background-color: white}
.demo1 .clip {-webkit-transform: rotate(15deg);}
.demo1 .inner {-webkit-transform: rotate(-15deg);}
.demo2 :nth-child(odd) .clip {-webkit-transform: rotate(15deg);}
.demo2 :nth-child(odd) .inner {-webkit-transform: rotate(-15deg);}
.demo2 :nth-child(even) .clip {-webkit-transform: rotate(-15deg);}
.demo2 :nth-child(even) .inner {-webkit-transform: rotate(15deg);margin-left: -151%;margin-top: -30%;}
Note the calculus to place the images accurately are strange; I end doing it by trial and error. Also, you need images with plenty of margin to be cutted without losing the point of interest.
I have spent much time on research on this topic and I'm not finding a solution for my particular problem even though I have come across similar issues but their solutions don't seem to fit mine. The issue I"m having does not exist in any non-IE browsers. The main navigation of the site I'm building (#mainNav) when I hover over the main a link to view the drop down, the the focus of the link seems to only be on the actual text. So, when I try to move the mouse down the list it gets no further than the main link text before the hand turns back to an arrow and the menu disappears. This is a CSS3 menu that is working on another site successfully in all browsers and there doesn't appear to be any IE fixes, so I grabbed the code and decided to use it for this site. Everything went well until I checked it in IE :/
These are the areas that I looked at (that normally are the issue in cases such as this): display-block (exists on all "a" tags), removed margins and increased padding (didn't help), assigned a height value (didn't help), increased line-height (nope). I read in other blogs that not having a background color on the link could be an issues (nope), also read that using a transparent 1px image would do the trick (nope). When I say "nope" that's assuming I incorporated the fix correctly.
I appreciate the help very much!
Here is the CSS:
/* //////// MAIN NAVIGATION //////// */
/* Reset */
#navMain,
#navMain ul,
#navMain li,
#navMain a {
border:none;
font-weight:normal;
margin:0;
outline:none;
padding:0;
z-index:1000;
}
/* Menu */
#mainNav-wrap {
width:100%;
height:47px;
float:left;
background:#00aeef;
border-top:#014964 1px solid;
box-shadow: 0px 2px 2px #999999;
}
#navMain {
/*height:40px;*/
width:960px;
position:relative;
z-index:500;
margin:0 auto;
}
#navMain li {
display:block;
float:left;
height:40px;
list-style:none;
/*padding:40px 8px 0 4px;*/
position:relative;
text-transform:uppercase;
}
#navMain li li {
text-transform:capitalize;
}
/* Links */
#navMain li a {
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
color:#fff;
display:block;
font-size:18px;
line-height:18px;
font-family:'Raleway', sans-serif;
padding:15px 19px;
text-decoration:none;
text-shadow:0px 1px 1px rgba(0,0,0,.1);
transition:color .2s ease-in-out;
-webkit-transition:color .2s ease-in-out;
-moz-transition:color .2s ease-in-out;
-ms-transition:color .2s ease-in-out;
-o-transition:color .2s ease-in-out;
}
#navMain li:first-child a {border-left:none;}
#navMain li:last-child a{border-right:none;}
#navMain li:hover > a {background:#565454;color:#fff200;}
/* Sub Menu */
#navMain ul {
background: #565454;
border-radius: 0 5px 5px 5px;
-moz-border-radius: 0 5px 5px 5px;
-webkit-border-radius: 0 5px 5px 5px;
position:absolute;
left: 0;
top: 46px;
opacity: 0;
filter: alpha(opacity = 0);
transition: opacity .25s ease .1s;
-moz-transition: opacity .25s ease .1s;
-ms-transition: opacity .25s ease .1s;
-o-transition: opacity .25s ease .1s;
-webkit-transition: opacity .25s ease .1s;
min-width:200px;
}
#navMain ul.electronics {
min-width:350px;
}
#navMain li:hover > ul {opacity:1;filter: alpha(opacity = 100);}
#navMain ul li {
height:0;
overflow:hidden;
padding:0;
transition: height .25s ease .1s;
-moz-transition: height .25s ease .1s;
-ms-transition: height .25s ease .1s;
-o-transition: height .25s ease .1s;
-webkit-transition: height .25s ease .1s;
}
#navMain li:hover > ul li {height:38px;overflow:visible;padding:0;}
#navMain ul li a {
border:none;
color:#fff;display:block;
font-size:18px;
margin:4px 4px;
padding:8px 14px 8px 14px;
white-space:nowrap;
width:200px; /* Stretches Submenu */
}
#navMain ul li:last-child {margin-bottom:6px;}
#navMain ul li:last-child a {border:none;padding:4px 14px 1px 14px;}
#navMain ul li a:hover {background:none;}
#navMain ul li span {white-space:nowrap;}
.navMain_buffer {height:8px;}
/* ////////// MAIN CONTENT /////////// */
Here is the HTML:
<div id="mainNav-wrap">
<ul id="navMain">
<li>ELECTRONICS
<ul class="electronics">
<li>HDTVs 19"-32"</li>
<li>HDTVs 37" and Up</li>
<li>Gaming Systems</li>
<li>Home Theater</li>
<li>Stereos and Home Theater Systems</li>
<li>Digital Cameras and Camcorders</li>
<li>Small Electronics</li>
</ul>
</li>
<li>Computers
<ul>
<li>Laptops</li>
<li>Tablets</li>
<li>Desktops</li>
<li>Computer Desks</li>
</ul>
</li>
<li>APPLIANCES
<ul>
<li>Washer and Dryers</li>
<li>Refrigerators</li>
<li>Freezers</li>
<li>Ranges</li>
</ul>
</li>
<li>Bedrooms
<ul>
<li>Bedroom Sets</li>
<li>Kid's Bedrooms</li>
<li>Mattresses</li>
</ul>
</li>
<li>Dinning Rooms</li>
<li>Living Rooms
<ul>
<li>Recliners</li>
<li>Sectionals</li>
<li>Living Room Sets</li>
<li>Accessories</li>
</ul>
</li>
</ul>
</div><!-- /END main-nav-wrap -->
I have the answer! It turned out that the element needed a z-index of -1000. That was causing my problem. So this is what needed to be added in my css:
html {
position:relative;
z-index:-1000;
}
At the moment I have this image:
What I've been asked to do is to give it this effect:
Forget about the background color - notice the reflection of part of the image underneath, still the same color but with an opacity-style effect on it.
I have tried using opacity, and webkit-reflection in CSS3 but have had no luck.
I've now taken that code out as it doesn't work, I'm just left with the original image:
.infrareporting_host_0 {
background: url("../interface/infrareporting/hostLightGreen.png") no-repeat scroll 0 0 transparent;
}
Please remember:
I only want exactly what is shown - a lower section of the image reflecting, NOT the whole image reflecting
How can I fade the opacity of the reflected image ONLY? the normal one I want to stay the same but fade the reflection
A cross-browser solution is best (atm I can only do it in chrome)
Update
So far my code is reflecting properly in chrome only but opacity is not working correctly. I have this:
-webkit-box-reflect: below -3px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(white));
you can do as following :
html :
<div class="image-block">
<img src="http://i.stack.imgur.com/mbf9p.png" alt="" />
<div class="reflection">
<img src="http://i.stack.imgur.com/mbf9p.png" alt="" />
<div class="overlay"></div>
</div>
</div>
css :
.image-block { width:78px; margin:0px 10px; float:left; }
.reflection { position:relative; }
.reflection img {
-webkit-transform: scaleY(-1);
-moz-transform: scaleY(-1);
-ms-transform: scaleY(-1);
-o-transform: scaleY(-1);
transform: scaleY(-1);
filter: flipv; opacity:0.20;
filter: alpha(opacity='20');
}
.overlay { position:absolute; top:0px; left:0px; width:78px; height:120px;
background-image: -moz-linear-gradient( center bottom, rgb(255,255,255) 60%, rgba(255,255,255,0) 75%);
background-image: -o-linear-gradient( rgba(255,255,255,0) 25%, rgb(255,255,255) 40%);
background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0.60, rgb(255,255,255)), color-stop(0.75, rgba(255,255,255,0)));
filter: progid:DXImageTransform.Microsoft.Gradient( gradientType=0, startColor=0, EndColorStr=#ffffff);
}
check live demo here : demo
You can use CSS 3 for it:
.reflect {
-webkit-box-reflect: below 0
-webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.5, transparent), to(white));
}
Or alternatives like this one:
http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/cross-browser-css-reflections-glows-and-blurs/
Use this code:
.infrareporting_host_0::before,
.infrareporting_host_0::after
{
content: "";
position: absolute;
top: 100%;
z-index: -1;
width: inherit;
height: inherit;
display: block;
}
.infrareporting_host_0::before
{
background: inherit;
}
For more info, see Crossbrowser CSS3 Reflections.
Can anyone let me know why my element will not fade in?
The background image properly animates, but the .home class just appears rather than fading in?
Thanks, code snippet is below.
#home {
width:35px;
height:35px;
float:left;
margin:20px 20px 0 20px;
transition:background-position .2s ease;
-webkit-transition: background-position .2s ease;
-moz-transition: background-position .2s ease;
background-image:url('images/icons.png');
}
#home > .home {
position:absolute;
display:none;
margin-top:40px;
opacity:0;
transition:opacity 3s linear;
}
#home:hover > .home {
display:block;
opacity:1;
}
#home:hover {
background-position:0px 35px;
}
<!-- END STYLE START HTML -->
<div id="home"><div class="home">HOME</div></div>
Add transition on hover as well.
#home:hover > .home {
display:block;
opacity:1;
transition:opacity 3s linear;
}
For cross-browsing transition add:
-moz-transition ...
-webkit-transition ...
-o-transition ...
-ms- is not supported.
From W3Schools: "The transition property is not supported in any browsers.". Instead, use the specific transition properties for Firefox, Chrome, Safari and Opera: http://www.w3schools.com/cssref/css3_pr_transition.asp
IE does not support this at all.
If you want real working transitions, you should consider using a javascript library that supports animations like JQuery.
Trying to create a content box that has a background color of white. It is inbetween the header div and footer div which are both images. I can't get it to align with the two divs AND have it without white space, only one or the other.
This is the CSS:
#content {
background-color:#ffffff;
width:1024px;
margin: 0 auto;
font-family:Verdana, Geneva, sans-serif;
font-size:12px;
padding: 0;
display: inline-block;
}
How do I get the content box to align with the rest of the page and not have any whitespaces?
This is what it looks like at the moment, I want to get rid of the space between the HELLO box and the images above and below it.
It doesn't seem as a clean solution to me, but here I go:
#content {
margin-top: -15px; margin-bottom: -15px;
}
Actually I don't know if -15px is good enough, you should try your own values.
It's not a great solution, but with the given information it's the only one i can come up with.
CSS
#content {
background-color:#ffffff;
width:1024px;
margin: 0 auto;
font-family:Verdana, Geneva, sans-serif;
font-size:12px;
padding: 0;
display: inline-block;
position:relative;
}
#topWhiteFix, #botWhiteFix {
position:absolute;
left:0px;
height:12px;
width:100%;
background:#FFFFFF;
}
#topWhiteFix {
top:-12px;
}
#botWhiteFix {
bottom:-12px;
}
HTML
<div id="content">
<div id="topWhiteFix"></div>
<div id="botWhiteFix"></div>
HELLO
</div>
(Untested)