css hover image and show icon not show
Tags: html,css,css3
Problem :
I design book front using css and need to show search icon in hover image using css
like this :
.third-effect .mask {
opacity: 0;
overflow:visible;
border:100px solid rgba(0, 0, 0, 0.7);
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
.third-effect a.info {
position:relative;
top:-10px;
opacity: 0;
-webkit-transition: opacity 0.5s 0s ease-in-out;
-moz-transition: opacity 0.5s 0s ease-in-out;
-o-transition: opacity 0.5s 0s ease-in-out;
-ms-transition: opacity 0.5s 0s ease-in-out;
transition: opacity 0.5s 0s ease-in-out;
}
.third-effect:hover .mask {
opacity: 1;
border:100px solid rgba(0, 0, 0, 0.7);
}
.third-effect:hover a.info {
opacity:1;
-moz-transition-delay: 0.3s;
-webkit-transition-delay: 0.3s;
-o-transition-delay: 0.3s;
-ms-transition-delay: 0.3s;
transition-delay: 0.3s;
}
.view {
overflow: hidden;
position: relative;
text-align: center;
cursor: default;
width: 122px;
height: 160px;
box-shadow: -3px 3px 0 #ccc, -6px 6px 0 #999, -9px 9px 0 #ccc;
-webkit-transition: all 0.15s ease;
}
.view:hover {
box-shadow: -5px 5px 0 #ccc, -10px 10px 0 #999, -15px 15px 0 #ccc;
}
.view .mask, .view .content {
width: 122px;
height: 160px;
position: absolute;
overflow: hidden;
top: 0;
left: 0;
}
.view img {
display: block;
position: relative;
}
.view a.info {
background:url("https://cdn3.iconfinder.com/data/icons/mixed-ui-icons-3/93/Untitled-124-128.png") center no-repeat;
display: inline-block;
text-decoration: none;
padding:0;
text-indent:-9999px;
width:20px;
height:20px;
}
But in action my search icon not show in hover image. how do fix this ?!
DEMO : http://jsfiddle.net/Sambora/o6nwamag/
Solution :
Try this style it's work. in your style remove border and set using background color.
.third-effect .mask {
opacity: 0;
overflow:visible;
background-color: rgba(0, 0, 0, 0.7);
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
.third-effect a.info {
position:relative;
top:40px;
opacity: 0;
-webkit-transition: opacity 0.5s 0s ease-in-out;
-moz-transition: opacity 0.5s 0s ease-in-out;
-o-transition: opacity 0.5s 0s ease-in-out;
-ms-transition: opacity 0.5s 0s ease-in-out;
transition: opacity 0.5s 0s ease-in-out;
}
.third-effect:hover .mask {
opacity: 1;
}
.third-effect:hover a.info {
opacity:1;
-moz-transition-delay: 0.3s;
-webkit-transition-delay: 0.3s;
-o-transition-delay: 0.3s;
-ms-transition-delay: 0.3s;
transition-delay: 0.3s;
}
.view {
overflow: hidden;
position: relative;
text-align: center;
cursor: default;
width: 122px;
height: 160px;
box-shadow: -3px 3px 0 #ccc, -6px 6px 0 #999, -9px 9px 0 #ccc;
-webkit-transition: all 0.15s ease;
}
.view:hover {
box-shadow: -5px 5px 0 #ccc, -10px 10px 0 #999, -15px 15px 0 #ccc;
}
.view .mask, .view .content {
height: 160px;
left: 0;
overflow: hidden;
position: absolute;
top: 0;
width: 122px;
}
.view img {
display: block;
position: relative;
}
.view a.info {
background: rgba(0, 0, 0, 0) url("https://cdn3.iconfinder.com/data/icons/mixed-ui-icons-3/93/Untitled-124-128.png") no-repeat scroll center center / 100% auto;
display: inline-block;
height: 20px;
padding: 20px;
text-decoration: none;
text-indent: -9999px;
width: 20px;
}
<div class="view third-effect">
<img src="http://i.imgur.com/nbynS1m.jpg" />
<div class="mask"> <a href="#" class="info" title="Full Image">Full Image</a>
</div>
</div>
CSS Howto..
Just add padding to the #about_us box while slice its width and height accordingly: #about_us { padding:20px 40px; } and configure line-height for the p label: #about_us p { line-height:40px;...
The way you have it, you will select div.header #id instead of div.header#id. You can fix that with a parent selector (&): div.header { &#id { position: relative; } border:...
Since you cause scroll on the container its contents (including the absolute positioned ones will also move accordingly) So make the #strip be 100% wide and overflow:hidden. This way the...
The code you are looking for: .nav > li > a:hover, .nav > li > a:focus { text-decoration: none; background-color: #EEE; } Super simple, fix: <link bootstrap /> <link custom...
You can use the comment system from Facebook... Simple to install and you can even manage the comments... Read more about it here: http://developers.facebook.com/docs/reference/plugins/comments/...
what your looking for is min-height and max-height. img { max-width: 100%; height: auto; } .item { width: 120px; min-height: 120px; max-height: auto; float: left; margin: 3px; padding: 3px; }...
You'll need to change a bit this function : Use 3 parameters (timeleft, timetotal, element) instead of the 2 actual Use setTimeout() to refresh your progress bar every second Check...
Use CSS3 media queries: @media screen and (min-width: 600px) { .aClass {} .anotherClass {} /* properties in here only apply when the viewport is wider than 600px */ } Using...
http://codepen.io/anon/pen/uozpm/ To show another background image on top of an image you can overlay it with use of absolute positioning. .complete { width:400px; height:400px; margin:40px 0 0 100px; text-align:center; color:#000;...
Here is a start from where you can experiment with circle, shadow and border. Fiddle Demo 1 Fiddle Demo 2 (Changed border/padding for image) <div class="login-wrapper" ng-controller="loginController"> <div class="field-wrapper"> <div...
To set the id: tbl.setAttribute('id', thisTablesId ); But probably what you want is to set the class attribute instead. Those don't need to be unique. You can change the css...
I haven't tested this, but try redState.getStyleClass().add("red-radio-button"); (or do this in FXML if you prefer). And then in an external css file .red-radio-button .dot { -fx-mark-highlight-color: red ; -fx-mark-color: red...
Add the User Agent to the <html> element with a tiny bit of JavaScript: var doc = document.documentElement; doc.setAttribute('data-useragent', navigator.userAgent); IE 10's User Agent string is: Mozilla/5.0 (compatible; MSIE 10.0;...
[fixed] Just add CSS: .navbar-brand { position: fixed; left: 1vw; }
You could use position:absolute for the image inside a container with position: relative when the viewport is 1679px wide or less (note: this approach requires to know in advance the...
You should add px at the end: jQuery("#home-bg.bg-1").css('background-position', '0, ' + windowHeight+'px'); ...
In order to get the most out of Bootstrap (especially the new "mobile first" features) I recommend using your Illustrator file as a jumping off point, rather than a spec....
You can't. Sizing and positioning are layout properties, and not under the remit of the theming machinery, which is exposed via CSS. If you could change sizing and position via...
First remove all absolute positioning. (as I mentioned in the comments) Next place the whitesmoke background on the title element instead of it's parent element (which has padding) and you...
The problem is that your CSS is trying to target the .wrapper div that exists inside the nav:hover which isn't how you HTML is set up. You can get pretty...
Put the CSS files in public/stylesheets and then use: <%= stylesheet_link_tag "filename" %> to link to the stylesheet in your layouts or erb files in your views. Similarly you put...
div label { display: inline-block; width: 150px; } I find this solution tends to work better than float....
Instead of float:right, use text-align:right in your div. #header{ border: 1px solid red; height: 30px; text-align:right; } img{ height:20px; vertical-align: middle; } #header:before, .frame_before { content: ""; display: inline-block; height:...
This is my solution to this problem: http://jsfiddle.net/CwgDQ/1/ Instead of overflowing the content of the container hide it by default and show on :hover. Add position:absolute to .copy and #tip2...
Use this .main{ display:table; text-align:center; margin:0 auto; } .main .list{ text-align:left; display:table-cell; } ...
You could give the mimosa-require-library-package a try. You could toss that in git with a bower.json and use mimosa-bower to pull in the file you are interested in.
You need the # to indicate your jQuery selector is targeting an id attribute for an HTML Element. Use the following: $('#my_grad').show() Further, you need to change the visibility:hidden; property...
What are your options here? Can you put more tags inside the cell and use CSS? Such as: <tr> <td> <p class="left">Cell Contents</p> <p class="right">:</p> <div class="clear"></div> </td> </tr> <style...
Using jquery and css you can create circle. I am giving here a jquery solution, as CSS solution already provided by others. check jquery DEMO. jQuery Code $(document).ready(function() { $("div").css("border-radius",...
Do not float the .DialogLine and .DialogAction elements Just give them the correct margin-left (equal to the width of the left column) And do not forget to give overflow:hidden to...