2013-04-25 20 views
5

जब मैं छवियों को घुमाता हूं तो मेरी छवि लिंक थोड़ा विग्लिंग कर रहे हैं। मुझे नहीं पता कि इसे कैसे ठीक किया जाए:/मैं होवर में चित्रों को थोड़ा बड़ा बनाने के लिए सीएसएस में स्केल प्रभाव का उपयोग कर रहा हूं।छवियां होवर करती हैं जब होवर (स्केल इफेक्ट)

मैं एक ही समस्या ...

कोड

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<link rel="icon" href="icon.ico" type="image/ico" /> 
<title>THU | TheHardUploader</title> 
</head> 
<style> 
    body{ 
     margin: 0px auto; 
     background-image:url(aa.jpg); 
     background-position: center; 
     background-attachment:fixed; 
     background-color:black; 
     background-repeat: no-repeat; 
     } 
    #main{ 
     margin: 0px auto; 
    } 

    .banner{ 
     height: 210px; 
     margin-top: 35px; 
     background-color: black; 
     -khtml-opacity:.50; 
     -moz-opacity:.50; 
     -ms-filter:”alpha(opacity=50)”; 
     filter:alpha(opacity=50); 
     filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0.5); 
     opacity:.50; 
     border-top: 5px solid gray; 
     border-bottom: 5px solid gray; 
    } 

    .logo{ 
     margin: 0px auto; 
     margin-top: -300px; 
     position:absolute; 
     margin-left: 40px; 
    } 

    .recordsbild{ 
     margin: 0px auto; 
     margin-left: 250px; 
     position:absolute; 
     margin-top: -200px; 
    } 

    .line{ 
     position:absolute; 
     height: 180px; 
     width: 10px; 
     background-color: white; 
     margin-top: -195px; 
     margin-left: 950px; 
    } 
    .musikstil{ 
     position:absolute; 
     font-family: "Arial Rounded MT Bold"; 
     font-size: 20px; 
     margin-left: 420px; 
     margin-top:-50px; 


    } 

    .musikstil a{ 
     text-decoration: none; 
     transition: opacity .35s ease-in-out; 
     -moz-transition: opacity .35s ease-in-out; 
     -webkit-transition: opacity .35s ease-in-out; 
     color: white; 
    } 

    .musikstil a:hover{ 
     opacity: 0.2; 
    } 


    .menu{ 
     position:absolute; 
     width: 120px; 
      opacity: 1.0; 
    transition: opacity .25s ease-in-out; 
    -moz-transition: opacity .25s ease-in-out; 
    -webkit-transition: opacity .25s ease-in-out; 
    margin: auto; 
    margin-top: -190px; 
    margin-left: 1020px; 
    } 

    .menu a{ 
     color: white; 
     font-family:"Arial Rounded MT Bold"; 
     text-decoration:none; 
     font-size: 20px; 
     transition: opacity .25s ease-in-out; 
     -moz-transition: opacity .25s ease-in-out; 
     -webkit-transition: opacity .25s ease-in-out; 
    } 
    .dub{ 
     color:white; 
    } 

    .hard{ 
     color: #009cff; 

    } 
    .glitch{ 
     color: #744eac; 

    } 
    .chill{ 
     color: #bc0096; 
    } 

    .menulogos{ 
     position:absolute; 
     margin-left: 890px; 
     margin-top: -215px; 
    } 
    .shop{ 
     position: absolute; 
     margin-top: 6px; 
    } 
    .promoting{ 
     position: absolute; 
     margin-top: 41px; 
    } 
    .about{ 
     position: absolute; 
     margin-top: 35px; 
    } 
    .artists{ 
     position: absolute; 
     margin-top: 28px; 
    } 
    .release{ 
     position: absolute; 
     margin-top: 17px; 
    } 

    .menu a:hover{ 
     opacity: 0.2; 
    } 
    .bannerwrap{ 
     width: 1280px; 
     margin: 0px auto; 
    } 
    .socialmedia{ 
     margin: 0px; 
     margin-left: 350px; 
     margin-top: 20px; 
    } 

    .socialmedia img{ 
     -webkit-transform:scale(0.9); /*Webkit: Scale down image to 0.8x original size*/ 
     -moz-transform:scale(0.9); /*Mozilla scale version*/ 
     -o-transform:scale(0.9); /*Opera scale version*/ 
     -webkit-transition-duration: 0.5s; /*Webkit: Animation duration*/ 
     -moz-transition-duration: 0.5s; /*Mozilla duration version*/ 
     -o-transition-duration: 0.5s; /*Opera duration version*/ 
     opacity: 1; /*initial opacity of images*/  
    } 
    .socialmedia img:hover{ 
     -webkit-transform:scale(1.1); /*Webkit: Scale up image to 1.2x original size*/ 
     -moz-transform:scale(1.1); /*Mozilla scale version*/ 
     -o-transform:scale(1.1); /*Opera scale version*/ 
     box-shadow:0px 0px 30px gray; /*CSS3 shadow: 30px blurred shadow all around image*/ 
     -webkit-box-shadow:0px 0px 30px gray; /*Safari shadow version*/ 
     -moz-box-shadow:0px 0px 30px gray; /*Mozilla shadow version*/ 
     opacity: 1; 

    } 

</style> 
<body> 
    <div id="main"> 

     <div class="banner">  
     </div> 
    <div class="bannerwrap"> 
     <div class="logo"> 
     <img src="logo.png" /> 
     </div> 
     <div class="recordsbild"> 
     <img src="records.png" /> 
     </div> 
     <div class="musikstil"> 
     <a href="#"> Dubstep &#11; |</a> 
     <a href="#"> &#11; Hardstyle &#11; |</a> 
     <a href="#"> &#11; Glitch Hop &#11; |</a> 
     <a href="#"> &#11; Chillstep</a> 
     </div> 
     <div class="line"> 
     </div> 
     <div class="menulogos"> 
     <img src="menulogo.png" /> 
     </div> 
     <div class="menu"> 
     <a href="#" class='contact'> Contact Us </a> 
     </br> 
     <a href="#" class='shop'> Shop </a> 
     </br> 
     <a href="#" class='release'> Releases </a> 
     </br> 
     <a href="#" class='artists'> Artists </a> 
     </br> 
     <a href="#" class='about'> About Us </a> 
     </br> 
     <a href="#" class='promoting'> Promoting </a> 
     </div> 
     </div> 
     <div class="socialmedia"> 
      <a href="#" class="fb"> <img src="fb.png" /></a> 
      <a href="#" class="youtube"> <img src="youtube.png" /> </a> 
      <a href="#" class="twitter"> <img src="twitter.png" /> </a> 
      <a href="#" class="soundcloud"> <img src="soundcloud.png" /> </a> 
     </div> 
    </div> 

</body> 
</html> 
+2

क्या आप शायद अपनी समस्या दिखा रहे हैं? –

उत्तर

4

यह CSS3 के परिवर्तनों के साथ एक आम समस्या है छाया प्रभाव को दूर करने के की कोशिश की है, लेकिन अभी भी। मैंने देखा है कि पाठ रोटेशन के बाद। और मुझे कुछ अजीब समाधान मिला है। मुझे नहीं पता कि यह कैसे काम करता है - लेकिन काम करता है :) बस कुछ CSS3 फ़िल्टर का उपयोग करें। कोई फ़िल्टर वेबकिट के लिए हो सकता है

-webkit-filter: blur(0px); 

http://jsfiddle.net/Rfg2V/

कि सामान्य प्रॉपर्टी कलंक बदल जाएगा नहीं है, लेकिन चिकनी परिवर्तन, अनुवाद का कारण होगा, और एंटीलायज़िंग़ प्रभावी होंगे।

Firefox के लिए आप

filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); 

उपयोग कर सकते हैं यह समस्या ठीक हो जाती है, लेकिन उस के बाद फिल्टर गुणों के साथ तत्वों थोड़ा धुंधला दिख सकता है। ऐसा नहीं है क्योंकि धुंध फ़िल्टर, परिणाम किसी भी फ़िल्टर के साथ समान है।

+0

यह मेरे लिए काम नहीं करता है:/ –

+0

आपके पास कौन सा ब्राउज़र है? नवीनतम क्रोम और एफएफ में मेरे लिए ठीक काम करता है। –

+0

Google क्रोम :) –

13

यदि आप वेबकिट ब्राउज़र का उपयोग कर रहे हैं तो निम्नलिखित मदद कर सकता है। इसे एनिमेट करने वाले तत्व के कंटेनर में जोड़ना एनीमेशन को आसान बनाना चाहिए। जहां तक ​​मैं इसे समझता हूं, यह ब्राउज़र को त्वरण का उपयोग करने में मजबूर करता है।

.socialmedia { 
    -webkit-backface-visibility: hidden; 
} 
+0

धन्यवाद! इसने काम कर दिया! –

+0

कोई समस्या नहीं, कृपया उत्तर के रूप में ऊपर उठाने और चिह्नित करें! :) – Mike

+0

मुझे नहीं पता क्यों, लेकिन इसका क्रोम 26.0.1410.64 –

0

मैं जानता हूँ कि मैं पार्टी के लिए एक तरह से देर हो रही है, लेकिन इनमे से कोई भी के बाद से मेरे लिए काम किया, मैं वहाँ अनुमान लगा रहा हूँ जब हॉवर पर अस्पष्टता का उपयोग कर मुझे दूसरों एक ही समस्या आ जाना चाहिए।

समाधान है कि काम करने के लिए मुझे आइटम को यह स्थापित करने के लिए किया गया था कि wiggleing था समाप्त हो गया: पर चल रहे ब्राउज़र के बजाय

-webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);

इस ग्राफ़िक प्रोसेसिंग यूनिट का उपयोग करने के लिए कंप्यूटर मजबूर कर रहा है, सी पी यू।

और पढ़ें: http://blog.teamtreehouse.com/increase-your-sites-performance-with-hardware-accelerated-css