सीएसएस एक सामग्री कंटेनर का एक बाएँ और दाएँ किनारों इस छवि की तरह लग रहे बनाने के लिए इस्तेमाल किया जा सकता है? मैं छवि का उपयोग किए बिना ऐसा करने का एक तरीका जानने का प्रयास कर रहा हूं, यदि यह संभव है।सीएसएस घुमावदार ढ़ाल और बॉक्स छाया
यहाँ jsFiddle है कि मैं पर काम कर रहा है है। "शीर्ष" वर्ग के लिए सीएसएस कभी भी लागू नहीं होता है। "नीचे" कक्षा के लिए सीएसएस ठीक काम करता प्रतीत होता है।
HTML:
<div class="drop-shadow top bottom">
Content here.
</div>
सीएसएस:
.drop-shadow {
/** Create container. Box-shadow here is to color the inside of the container **/
position:relative;
width:50%;
background: none repeat scroll 0 0 #FFFFFF;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
padding:3em;
margin: 2em 20px 4em;
text-align:center
}
.top:before,
.top:after {
/** Generate pseudo-elements ('before' and 'after') and push them behind the container box. Position pseudo-elements ('before', and 'after') and give them dimensions **/
content:"";
position:absolute;
z-index:-1;
top:20px;
left:0;
width:40%;
height:1em;
max-width:150px;
-webkit-box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
-moz-box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
-webkit-transform:rotate(70deg);
-moz-transform:rotate(70deg);
-o-transform:rotate(70deg);
transform:rotate(70deg);
}
.top:after{
/**One of the pseudo-elements then needs to be positioned on the other side of the element and rotated in the opposite direction. This is easily done by overriding only the properties that need to differ **/
right:0;
left:auto;
-webkit-transform:rotate(-70deg);
-moz-transform:rotate(-70deg);
-o-transform:rotate(-70deg);
transform:rotate(-70deg);
}
.bottom:before,
.bottom:after {
/** Generate pseudo-elements ('before' and 'after') and push them behind the container box. Position pseudo-elements ('before', and 'after') and give them dimensions **/
content:"";
position:absolute;
z-index:-2;
top:90px;
left:0;
width:10%;
max-width:150px;
-webkit-box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
-moz-box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
-webkit-transform:rotate(99deg);
-moz-transform:rotate(99deg);
-o-transform:rotate(99deg);
transform:rotate(99deg);
}
.bottom:after{
/**One of the pseudo-elements then needs to be positioned on the other side of the element and rotated in the opposite direction. This is easily done by overriding only the properties that need to differ **/
right:0;
left:auto;
-webkit-transform:rotate(-99deg);
-moz-transform:rotate(-99deg);
-o-transform:rotate(-99deg);
transform:rotate(-99deg);
}
पर इस [कड़ी] एक नजर डालें (http://www.sitepoint.com/pure-css3-paper-curl/) यह एक नीचे कर्ल देखो कहते हैं, लेकिन यह आपको यह पता लगाने की है कि यह कैसे काम कर पाने के मदद कर सकता है बाएं और दाएं। –
धन्यवाद, मैं एक jsfiddle और सीएसएस मैं अब तक है कि के साथ सवाल अपडेट किया गया। मुझे लगता है कि यह करीब है लेकिन अभी भी कुछ समस्याएं हैं। – Mdd