CSS Text Colour [closed] - css

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
I have some text that I rotate and fade in. My problem is the text has no colour, and I would like to make it blue.
As you can see, I do assign a color attribute to the rubber class, but it does not seem to be taking effect.
Please can anyone advise how I can change my css to achieve this? Thank you
.rubber {
padding: 5px 2px;
color: blue;
font-family: 'Black Ops One', cursive;
text-transform: uppercase;
text-align: center;
width: 155px;
transform: rotate(-10deg);
}
// fade-in
.fade-in p {
margin-top: 25px;
text-align: center;
animation: fadein 8s;
-moz-animation: fadein 8s;
/* Firefox */
-webkit-animation: fadein 8s;
/* Safari and Chrome */
-o-animation: fadein 8s;
/* Opera */
}
#keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 0.8;
}
}
#-moz-keyframes fadein {
/* Firefox */
from {
opacity: 0;
}
to {
opacity: 0.8;
}
}
#-webkit-keyframes fadein {
/* Safari and Chrome */
from {
opacity: 0;
}
to {
opacity: 0.8;
}
}
#-o-keyframes fadein {
/* Opera */
from {
opacity: 0;
}
to {
opacity: 0.8;
}
}
<div class="rubber fade-in">
<p>Job Offered</p>
</div>

Please replace // fade-in with /* fade-in */ . In css
to add comment line you should use /* comment here */
Here is the working code
.rubber {
padding: 5px 2px;
color: blue;
font-family: 'Black Ops One', cursive;
text-transform: uppercase;
text-align: center;
width: 155px;
transform: rotate(-10deg);
}
/* fade in */
.fade-in p{
margin-top: 25px;
text-align: center;
animation: fadein 8s;
-moz-animation: fadein 8s; /* Firefox */
-webkit-animation: fadein 8s; /* Safari and Chrome */
-o-animation: fadein 8s; /* Opera */
}
#keyframes fadein {
from {
opacity:0;
}
to {
opacity:0.8;
}
}
#-moz-keyframes fadein { /* Firefox */
from {
opacity:0;
}
to {
opacity:0.8;
}
}
#-webkit-keyframes fadein { /* Safari and Chrome */
from {
opacity:0;
}
to {
opacity:0.8;
}
}
#-o-keyframes fadein { /* Opera */
from {
opacity:0;
}
to {
opacity:0.8;
}
}
<div class="rubber fade-in"><p>Job Offered</p></div>

I tried your code in jsfiddle as well as it normal HTML page.
Only problem was with the comment in css style tag use this format
/ Shift+8 comment Shift+8/

Related

How can i make my page title to be on top of everything in wordpress ? I am using elementor hello theme and elementor pro

h1.entry-title {
z-index: 9999;
color: #F23400;
font-family: 'Roboto', sans-serif;
font-size: 44px;
font-weight: 800;
font-style: italic;
text-align: center;
line-height: 15;
-webkit-animation: fadein 3s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 3s; /* Firefox < 16 */
-ms-animation: fadein 3s; /* Internet Explorer */
-o-animation: fadein 3s; /* Opera < 12.1 */
animation: fadein 3s;
}
#keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Firefox < 16 */ #-moz-keyframes fadein { from { opacity: 0; } to { opacity: 1; } } /* Safari, Chrome and Opera > 12.1 */
#-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Internet Explorer */
#-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Opera < 12.1 */
#-o-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
z-index: 9999;
}
This is what i have tried with no luck. I am sorry if this was answered before. I have set the background image to -1 that is on this page, and the title to 9999 with z-index. I am using elementor pro to do such editing on that image.

Keyframes are not working on IE

I made some research on Stackoverflow and everywhere on the web about my issue with keyframes on IE, but I couldn't find a proper answer.
I can't get my CSS code below to work on IE and I have no idea how to fix this issue:
body{
color: #444444;
text-align: center;
height: 100%;
background-color: #fff;
font-family: 'Montserrat', helvetica, arial, sans-serif;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
opacity: 0;
-webkit-animation: showImg 1200ms 600ms forwards ease-out;
-o-animation: showImg 1200ms 600ms forwards ease-out;
-moz-animation: showImg 1200ms 600ms forwards ease-out;
animation: showImg 1200ms 600ms forwards ease-out;
}
#keyframes showImg{
100% {
opacity: 1;
}
}
#keyframes hideImg{
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
#-webkit-keyframes showImg{
100% {
opacity: 1;
}
}
#-webkit-keyframes hideImg{
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
#-o-keyframes showImg{
100% {
opacity: 1;
}
}
#-o-keyframes hideImg{
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
It works fine on Firefox and Chrome.
Has anyone already encoutered this problem too?
Thanks a million in advance for your help.
I also had this problem. I had the keyframes within #media only screen and (max-width: 600px) and (orientation: portrait) {}. The keyframes outside of #media ... worked for me

Display issues with details and summary and a re-aligned webkit marker (jsfiddle included), CSS3 and HTML5

I have bumped into something of a rather trivial (But serious) issue. I have successfully implemented a function that allows me to hide and expand content (Courtesy to the HTML5 Doctor) through a custom symbol, in this case a "+" and a "-".
Here I have successfully implemented a version of this code in jsfiddle. Below is an excerpt of the CSS:
summary:-webkit-details-marker {
color: 000;
display: none;
font-size: 125%;
margin-right: 2px;
animation: fadein 3s;
-moz-animation: fadein 3s; /* Firefox */
-webkit-animation: fadein 3s; /* Safari and Chrome */
-o-animation: fadein 3s; /* Opera */
height: 10px;
font-size: 20px;
overflow: hidden;
}
summary:after {
background: transparent;
border-radius: 5px;
content: "+";
color: #000;
float: left;
font-size: 1.5em;
font-weight: bold;
margin: -5px 10px 0 0;
padding: 0;
text-align: center;
width: 20px;
}
details[open] summary:after {
content: "-";
}
summary:focus {
outline-style: none;
animation: fadein 3s;
-moz-animation: fadein 3s; /* Firefox */
-webkit-animation: fadein 3s; /* Safari and Chrome */
-o-animation: fadein 3s; /* Opera */
}
article > details > summary {
color: transparent;
font-size: 18px;
margin-top: 16px;
animation: fadein 3s;
-moz-animation: fadein 3s; /* Firefox */
-webkit-animation: fadein 3s; /* Safari and Chrome */
-o-animation: fadein 3s; /* Opera */
}
details > paragraph {
margin-left: 24px;
animation: fadein 3s;
-moz-animation: fadein 3s; /* Firefox */
-webkit-animation: fadein 3s; /* Safari and Chrome */
-o-animation: fadein 3s; /* Opera */
}
details details {
margin-left: 36px;
animation: fadein 3s;
-moz-animation: fadein 3s; /* Firefox */
-webkit-animation: fadein 3s; /* Safari and Chrome */
-o-animation: fadein 3s; /* Opera */
}
details details summary {
font-size: 16px;
animation: fadein 3s;
-moz-animation: fadein 3s; /* Firefox */
-webkit-animation: fadein 3s; /* Safari and Chrome */
-o-animation: fadein 3s; /* Opera */
}
#keyframes fadein {
from {
opacity:0;
}
to {
opacity:1;
}
}
#-moz-keyframes fadein { /* Firefox */
from {
opacity:0;
}
to {
opacity:1;
}
}
#-webkit-keyframes fadein { /* Safari and Chrome */
from {
opacity:0;
}
to {
opacity:1;
}
}
#-o-keyframes fadein { /* Opera */
from {
opacity:0;
}
to {
opacity: 1;
}
}
Now, I would like to have a version where the expand/hide symbol is merely aligned to the right. I attempted this, however it fails to function as planned, with the text not only prematurely displaying but with the symbol seemingly disabled from any kind of action. Indeed, my gut feelings is that I have done something really stupid, though ironically the realignment is the only thing that seems to have worked.
Without further ado, here is an excerpt of the CSS from the jsfiddle:
rsummary:-webkit-rdetails-marker {
color: 000;
display: none;
font-size: 125%;
margin-left: 2px;
animation: fadein 3s;
-moz-animation: fadein 3s; /* Firefox */
-webkit-animation: fadein 3s; /* Safari and Chrome */
-o-animation: fadein 3s; /* Opera */
height: 10px;
font-size: 20px;
overflow: hidden;
}
rsummary:after {
background: transparent;
border-radius: 5px;
content: "+";
color: #000;
float: right;
font-size: 1.5em;
font-weight: bold;
margin: -5px 10px 0 0;
padding: 0;
text-align: center;
width: 20px;
}
rdetails[open] rsummary:after {
content: "-";
float: right;
}
rsummary:focus {
outline-style: none;
animation: fadein 3s;
-moz-animation: fadein 3s; /* Firefox */
-webkit-animation: fadein 3s; /* Safari and Chrome */
-o-animation: fadein 3s; /* Opera */
}
rarticle > rdetails > rsummary {
color: transparent;
float: right;
font-size: 18px;
margin-top: 16px;
animation: fadein 3s;
-moz-animation: fadein 3s; /* Firefox */
-webkit-animation: fadein 3s; /* Safari and Chrome */
-o-animation: fadein 3s; /* Opera */
}
rdetails > rparagraph {
margin-right: 24px;
animation: fadein 3s;
-moz-animation: fadein 3s; /* Firefox */
-webkit-animation: fadein 3s; /* Safari and Chrome */
-o-animation: fadein 3s; /* Opera */
}
rdetails rdetails {
margin-right: 36px;
animation: fadein 3s;
-moz-animation: fadein 3s; /* Firefox */
-webkit-animation: fadein 3s; /* Safari and Chrome */
-o-animation: fadein 3s; /* Opera */
}
rdetails rdetails rsummary {
font-size: 16px;
animation: fadein 3s;
-moz-animation: fadein 3s; /* Firefox */
-webkit-animation: fadein 3s; /* Safari and Chrome */
-o-animation: fadein 3s; /* Opera */
}
#keyframes fadein {
from {
opacity:0;
}
to {
opacity:1;
}
}
#-moz-keyframes fadein { /* Firefox */
from {
opacity:0;
}
to {
opacity:1;
}
}
#-webkit-keyframes fadein { /* Safari and Chrome */
from {
opacity:0;
}
to {
opacity:1;
}
}
#-o-keyframes fadein { /* Opera */
from {
opacity:0;
}
to {
opacity: 1;
}
}
Because I want two versions, where one marker floats to the left (Which I already have and properly working, see the first jsfiddle) and one that floats to the right, it becomes pertinent that the right one must function as well.
Alternatively, if there is a way to hide/expand the text by clicking the banner itself, I would be grateful as it is the way I really want it to work instead of using a +/- symbol. Obviously this means removing the hyperlink attached to the image, but that won't be a problem.
This has been bugging me for a couple of days now so I appreciate any help I can get on this. Thanks.
The problem is that you are using tags which don't exist in the specifications. The tags <details> and <summary> are what provide the hide/expand behavior. You cannot simply rename them. Further, there is only limited support for the behavior attached to these elements. Specifically, there is support in Chrome, Safari and Opera, but none in IE or Firefox (http://caniuse.com/#search=details).
I see that you are using quite a few non-standards based tags. For example: <paragraph> and <rparagraph> instead of the <p> tag. Accordingly, your result will be less than predictable.
If you want the hide/expand behavior of the details and summary tags on the limited browser set where it is supported, you have no choice but to use the supported tags. If you want to have greater support, you can implement a fallback using Javascript or jQuery, such as this one: http://mathiasbynens.be/notes/html5-details-jquery.
Crossbrowser use of details and summary
In previous days, I needed to do some implementations with details and summary tags; Suddenly I found a compatibility problem between browsers, so traced several posts on different sites and some were confused. So I bring this site my conclusions.
1. Based in Nicolas Gallagher's git.io/normalize, review the details and summary tags in your CSS:
details, summary { display: block; }
2. Configure the CSS for this tags sample in JSFIDDLE
3. In HTML, you need remember that ALL details CHILDRENS need be inside of a HTML tag as p, a, div or other; Text out HTML tags will be showed on non webkit browsers in closed state.
4. In JQuery you need a small code to switch states sample in JSFIDDLE
Note: this is a low weight implementation with fine response; let me know your oppinions.
Test on JSFIDDLE Include code comments

firefox #keyframes solution

Hello i am using css3 to animate place holder i figured out to run this on webkit navigators but firefox and ie the animation doesn't work and i think the problem is #keyframes please guys any solution guys ?
input::-moz-placeholder {
color: #8D8D8D;
}
input::-webkit-input-placeholder {
color: #8D8D8D;
}
input:-ms-input-placeholder {
color: #8D8D8D;
}
input:focus::-moz-placeholder {
animation-duration: 0.4s;
animation-name: slidein;
animation-timing-function: ease-out;
animation-fill-mode: forwards;
animation-delay: 0.1s;
}
input:focus::-webkit-input-placeholder {
-webkit-animation-duration: 0.4s;
-webkit-animation-name: slidein;
-webkit-animation-timing-function: ease-out;
-webkit-animation-fill-mode: forwards;
-webkit-animation-delay: 0.1s;
}
input:focus:-ms-input-placeholder {
opacity: 0;
}
input {
color: black;
padding-left: 0px;
padding-right: 10px;
}
#-webkit-keyframes slidein {
from {
opacity: 1;
padding-left: 0px;
}
to {
opacity: 0;
padding-left: 10px;
}
}
#keyframes slidein {
from {
opacity: 1;
padding-left: 0px;
padding-right: 10px;
}
to {
opacity: 0;
padding-left: 10px;
padding-right: 0px;
}
}
this is live demo http://jsfiddle.net/Cd8MG/
you need #-ms-keyframes, #-moz-keyframes, #-webkit-keyframes, and #keyframes to cover all of your bases. Yes, your code will be 10 miles long.
Ok My final conclusion is :
No one seems to have noticed, but in Firefox the behavior of the placeholder attribute is to leave the text until the user begins typing, at least in the most recent versions. Webkit solutions (or should I say -webkit solutions) to Webkit problems don’t seem to last long these days.

Only background image has to fade in on page load

I have a div with a background image (an arrow). In the div is some text, the arrow is below it. I want the text inside the div to load with the page, but the background image load a few seconds later.
This is my code:
.homearrow {
background: url(http://www.stefaanoyen.be/wp-content/uploads/2013/03/arrow.png) no-repeat 200px 155px;
background-size: 125px 125px;
float: left;
-webkit-animation: fadein 4s; /* Safari and Chrome */
-moz-animation: fadein 4s; /* Firefox */
-ms-animation: fadein 4s; /* Internet Explorer */
-o-animation: fadein 4s; /* Opera */
animation: fadein 4s;
}
#keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Firefox */
#-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Safari and Chrome */
#-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Internet Explorer */
#-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}​
/* Opera */
#-o-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}​
The problem: the whole div (text and background image) fades in. Is there a way to make the background image fade in, not the text?
Thank you,
Stefaan
Try the following
<html>
<head>
<style>
.wrapper {position: relative; margin: 15px 15px 15px 15px ;}
.homearrow {
background: #fff url('arrow.png') 0px 0px no-repeat ;
background-size: 125px 125px;
float: left;
-webkit-animation: fadein 4s; /* Safari and Chrome */
-moz-animation: fadein 4s; /* Firefox */
-ms-animation: fadein 4s; /* Internet Explorer */
-o-animation: fadein 4s; /* Opera */
animation: fadein 4s;
height: 125px;
width: 125px;
position: absolute; top: 0px; left: 0px;
}
.homearrowtext {position: absolute; top: 10px; left: 10px; }
#keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Firefox */
#-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Safari and Chrome */
#-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Internet Explorer */
#-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}​
/* Opera */
#-o-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}​
</style>
</head>
<body>
<div class="wrapper">
<div class="homearrow"></div>
<p class="homearrowtext">Hello World</p>
</div>
</body>
I have put the text outside the div, applied position relative to the containing div and position absolute to the text. I have also given the image div some width and height.
Hope this helps.

Resources