fade

Fade In and / or Out Placeholder Text

大兔子大兔子 提交于 2019-12-11 09:05:52
问题 Is there a way to fade in and out an input's placeholder text? I've tried: $('.userBox::-webkit-input-placeholder').animate({color: '#888888'}, 500); But this just crashes... 回答1: If you want to fade out on focus, and fade back in on blur ( when the input box is empty ), the following should work in webkit: HTML: <input id="user_email" name="user[email]" placeholder="user@example.org" type="email" /> CSS: input[type="email"]::-webkit-input-placeholder { -webkit-transition: opacity 0.3s linear

ie problem with fading in text

余生长醉 提交于 2019-12-11 08:57:15
问题 Does anyone know how to fix the ie problem with fading in text? It looks jagged and the bg fix doesnt apply to me cause i have a gradient (havent tried it though to see if it does actually work). I have tried the remove filter but no luck so far. Any ideas? 回答1: Its an anti aliasing problem that IE has with opacity or the alpha filter i think. Possible fixes: http://forum.jquery.com/topic/jquery-prevent-jagged-text-in-ie http://hurtsmybrains.wordpress.com/2010/01/21/jquery-fadein-fadeout

Fading a JLabel that contains html

余生长醉 提交于 2019-12-11 08:54:22
问题 I can fade out a normal JLabel using a Timer, as follows: public static void main(String[] args) { JFrame frame = new JFrame(); // final JLabel label = new JLabel("<html><font color=red>Red</font><font color=blue>Blue</font>"); final JLabel label = new JLabel("Hello"); label.setOpaque(true); label.setBackground(Color.WHITE); frame.getContentPane().add(label); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); final Timer timer = new Timer(100, null); final int steps = 25

fadeout, load new content, fadein --> slide

回眸只為那壹抹淺笑 提交于 2019-12-11 07:41:35
问题 I am currently fading out the content of a div, replacing it with new content, and then fading it in again as follows: area.fadeOut('400').load("file.php", function(){ $(this).fadeIn('400'); } ); First of all, is this chained correctly? Secondly, I would like to replace the fading-in by sliding-in from the right, if that was possible (would need to slide the old content to the left)? How could that be achieved? 回答1: I'd like to point out that fadeIn & fadeOut are part of jQuery Core. Do you

How do I create a fade-in load effect, one after another image

你。 提交于 2019-12-11 06:52:51
问题 I've got inspired by the thumb loading effect on this page, but honestly got no clue how to create such effect, on each thumb. Who could point me in the right direction, or even give me some lines of codes? I've seen some other topics related, but those won't work in a situation where many images will be loaded, one after another. Thanks! 回答1: The script : $(function(){ $("#listing .img").each(function(index) { $(this).hide().delay(100*index).fadeIn(300); }); }); Then the html : <div id=

Add fade effect on active bg

亡梦爱人 提交于 2019-12-11 06:38:10
问题 I have a menu structure: <ul id="nav"> <li id="button1" class="active"><a href="#page-1" title="creative">creativ</a>< <li id="button1"><a href="#page-1" title="creative">creativ</a></ul> And i add background image every .active class: #nav li.active a{cursor:default; background:url(images/nav-li-a_hover.png) no-repeat bottom center; padding-bottom:5px;} It's working. But i want when i click a menu item, get background-image with fade effect. How can i do this via jQuery or CSS3? 回答1: First

Multiple image elements all fading when hovered in Jquery.

心已入冬 提交于 2019-12-11 06:25:07
问题 I'm having an issue with applying a fade to just one element on the page with the same ID. Firstly I fade the image down to 60% and then on hover I would like it to just 100% the image. This part works but it applies the effect to every element on the page. // Fading images $(document).ready(function(){ $('.mainArticle img').fadeTo('slow', 0.6); $('.mainArticle img, .articleContainer').hover(function(){ $(this).find('.mainArticle img, .articleContainer').stop(true,true).fadeTo("slow", 1.0); }

Add a fadeIn effect on toggleclass?

柔情痞子 提交于 2019-12-11 04:06:13
问题 I want to add a fadeIn/Out effect on a toggle class when navigation is open and close. Somebody know how? I'm using the toggle class because of a responsive problem i had before when resizing part of the navigation disappeared. FIDDLE example nav ul.show { display: block; } And for the javascript $(function() { $('.nav-btn').click(function(event) { $('nav ul').toggleClass("show"); }); }); 回答1: Try this: Demo // Show navigation // $(function() { $('.nav-btn').click(function(event) { // alert()

Jquery fade in, fade out some elements together

丶灬走出姿态 提交于 2019-12-11 03:24:41
问题 I need to fade out and fade in some child elements in <div> like in Toni Almeida'a answer: Fade in and out image <div class="display" id="slideshow"> <a class="slice" href="myUrl1"> <div class="caption">Some text1...</div> <img src="AnyUrl1" width="360" height="300"/> </a> <a class="slice" href="myUrl2"> <div class="caption">Some text2...</div> <img src="AnyUrl2" width="360" height="300"/> </a> <a class="slice" href="myUrl3"> <div class="caption">Some text3...</div> <img src="AnyUrl3" width=

Jquery animate navigation color

穿精又带淫゛_ 提交于 2019-12-11 03:14:39
问题 Hi I am making a website at the moment and am I having trouble with animating the navigation bar. I would like the navigation bar to be transparent originally, than for it to change background-color after a certain div. I have done this but want the background-color to fade in, not just appear. Below is the HTML and Jquery. How do I make it fade to the background-color? HTML <div class="nav"> <div class="container"> <div class="logo"> <a href="#"><img src="RepublicSquare_logo.svg" style=