animation style working fine with mozilla and changes color after 5sec but when I tried to run same code on chrome then its not taking that effect??
Style:
.changeColor{
animation: change 5s step-end both;
}
#keyframes change {
from { color: red }
to { color: #4D4D4D }
}
HTML:
<label class="changeColor">XYZ</label>
Internet Explorer 10, Firefox, and Opera supports the #keyframes rule and animation property.
Chrome and Safari requires the prefix -webkit-.
#keyframes myfirst
{
from {background: red;}
to {background: yellow;}
}
#-webkit-keyframes myfirst /* Safari and Chrome */
{
from {background: red;}
to {background: yellow;}
}
When the animation is created in the #keyframe, bind it to a selector, otherwise the animation will have no effect.
Bind the animation to a selector by specifying at least these two CSS3 animation properties:
Specify the name of the animation
Specify the duration of the animation
Note: Internet Explorer 9, and earlier versions, does not support the #keyframe rule or animation property.
div
{
animation: myfirst 5s;
-webkit-animation: myfirst 5s; /* Safari and Chrome */
}
Related
I am new to animations in css.
I have just upgraded primeng version to v12 to my angular application 11.
I am using primeng sidebar. the sidebar after closed, the overlay is not disappearing.
Can see p-component-overlay-leave classes is added to the overlay but since there is no corresponding animation css available it is not disappearing. can anyone show me how to add this so the overlay disappears after the sidebar is closed.
css added for overlay enter:
.p-component-overlay-enter {
animation: p-component-overlay-enter-animation 150ms forwards;
animation-duration: 150ms;
animation-timing-function: ease;
animation-delay: 0s;
animation-iteration-count: 1;
animation-direction: normal;
animation-fill-mode: forwards;
animation-play-state: running;
animation-name: p-component-overlay-enter-animation;
}
trying to add the following but not sure how to add the respective css:
.p-component-overlay-leave {
animation: p-component-overlay-leave-animation 150ms forward;
}
Added the following and it worked
.p-component-overlay-leave {
animation: p-component-overlay-leave-animation 150ms forwards;
}
#keyframes p-component-overlay-leave-animation {
from {
background-color: rgba(0, 0, 0, 0.4);
}
to {
background-color: transparent;
}
}
How to hide scrollbar in v-textarea?
While this works on simple textbox, but in v-textarea doing this does not work:
<v-textarea class="hide-scrollbar"/>
<style>
.hide-scrollbar::-webkit-scrollbar {
display: none;
}
</style>
.hide-scrollbar textarea {overflow-y:hidden}
Hide Scrollbars But Keep Functionality
// Hide scrollbar for Chrome, Safari and Opera */
.hide-scrollbar::-webkit-scrollbar {
display: none;
}
// Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
Hide Scrollbars and Functionality
.hide-scrollbar{
overflow: hidden;
}
I'm using video.js with a custom skin for some videos on an html page.
Everything is working fine except for Safari Mobile iOS 7, cause it doesn't hide the default play button for videos.
I'm using all this css rules
.video-js video::-webkit-media-controls {
display:none !important;
}
.video-js video::-webkit-media-controls-panel {
display: none!important;
-webkit-appearance: none;
}
.video-js video::--webkit-media-controls-play-button {
display: none!important;
-webkit-appearance: none;
}
.video-js video::-webkit-media-controls-start-playback-button {
display: none!important;
-webkit-appearance: none;
}
and actually i can see these rules on inspector but they are simply not working.
Is there a way to hide the button or is that a safari bug?
Note: this answer works for controls panel play button and not for big play button over video element
There are different CSS styles for shadow elements on different iOS versions.
For iOS 7 instead of
.video-js video::--webkit-media-controls-play-button
should be
.video-js video::-webkit-media-controls-play-button
Here is a list of all shadow subelements in HTML video element on iOS 7 (I've checked it on my devices):
<div>:
video::-webkit-media-controls
video::-webkit-media-controls-panel
video::-webkit-media-controls-timeline-container
video::-webkit-media-controls-current-time-display
video::-webkit-media-controls-time-remaining-display
video::-webkit-media-controls-panel
<input type="button">:
video::-webkit-media-controls-rewind-button
video::-webkit-media-controls-play-button
video::-webkit-media-controls-return-to-realtime-button
video::-webkit-media-controls-seek-back-button
video::-webkit-media-controls-seek-forward-button
video::-webkit-media-controls-mute-button
video::-webkit-media-controls-volume-slider-mute-button
video::-webkit-media-controls-fullscreen-button
video::-webkit-media-controls-fullscreen-volume-min-button
video::-webkit-media-controls-fullscreen-volume-max-button
<input type="range">:
video::-webkit-media-controls-timeline
video::-webkit-media-controls-volume-slider
video::-webkit-media-controls-fullscreen-volume-slider
I am having an issue with my boostrap everytime in mobile i try to open the collapsed menu its shows a little "jump". Already tried to style the class .in but still nothing. Any hint what might be happening?
You can see the issue in http://real-embrace-portugal.pt/
Thanks for the help.
This problem is caused by the carousel of images.
You need to stop the carousel when scrolling
$(window).scroll(function() {
//User is scrolling
//Stop the carousel
$('#myCarousel').carousel('pause');
});
you can use
$('#myCarousel').carousel('cycle');
for start the carouse cycle again
please use this css.. i think ur problem is solve..
#media only screen and (max-width: 767px) {
.navbar-default .navbar-brand {
color: #777;
height: auto !important;
}
.collapse.in {
display: block;
margin-top: 0 !important;
}
}
datatables.min.css datatables.min.js 2.1.4 jquery, 3.3.5 bootstrap, 1.10.8 datatables
Clear icon does not appear on search filter input for chrome, firefox, but it appears in IE10 and later. Can be easily reproduced in bootstrap sample (https://www.datatables.net/manual/styling/bootstrap ).
When I add my implementation of clear icon the default one also appears in IE.
Is there a simple workaround to turn off extra clear icon for some browsers?
Bootstrap's styling removes the clear icon from the search input from bootstrap datatable. This is part of Bootstrap's default behaviour.
Add this to your CSS:
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: searchfield-cancel-button;
}
It will override Bootstrap's hiding of the clear button.
This is html5 issue:
/* Disable browser close icon for IE */
input[type="search"]::-ms-clear { display: none; width : 0; height: 0; }
input[type="search"]::-ms-reveal { display: none; width : 0; height: 0; }
/* Disable browser close icon for Chrome */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration { display: none; }
Here is an article for more details on html5 input[type="search"] disabling
This solution worked for me:
<script>
$(document).ready(function() {
$('.dataTables_filter input').addClass('searchinput');
$('.dataTables_filter input').attr('placeholder', 'Buscar');
$(".searchinput").keyup(function () {
$(this).next().toggle(Boolean($(this).val()));
});
$(".searchclear").toggle(Boolean($(".searchinput").val()));
$(".searchclear").click(function () {
$(this).prev().val('').focus();
$(this).hide();
var table = $('#dt_basic').DataTable();
//clear datatable
table
.search('')
.columns().search('')
.draw();
});
});
</script>
css:
.searchclear {
float:left;
right:22px;
top: 8px;
margin: auto;
font-size: 18px;
cursor: pointer;
color: #ccc;
}
and in jquery.dataTables.min.js you need add the icon remove-circle after input:
original code
'<input type="search" '+c.sFilterInput+'"/>'
new code
<input type="search" '+c.sFilterInput+'"/><span id="searchclear" class="searchclear glyphicon glyphicon-remove-circle"></span>'
example image