मैं फ़ॉन्ट भयानक पुस्तकालय का उपयोग कर रहा हूं क्षैतिज रूप से केंद्र तीर आइकन। और DIVs होना चाहिए पूर्ण पद।
मैं इस कोड का उपयोग करता हूं, लेकिन यह काम नहीं करता है।
.arrow {
left: 0;
right: 0;
}
उत्तर:
जवाब के लिए 3 № 1उपयोग width:100%
पूर्ण में div
.home .center {
position: absolute;
bottom: 0;
top:30px;
text-align: center;
width:100%;
}
अपडेट किया गया बेला
जवाब के लिए 2 № 2
यहाँ काम कर रहा उदाहरण है। आप हटा सकते हैं ।तीर सीएसएस नियम क्योंकि यह कुछ भी नहीं करता है।
.home {
margin: 0 auto;
height: 100%;
width: 100%;
position: relative;
margin: 0 auto;
max-width: 960px;
}
.home .center {
position: absolute;
width: 100%;
bottom: 0;
top:30px;
text-align: center;
}
उत्तर № 3 के लिए 1
मैं अभी आपके CSS में बदला हूँ, और यह ठीक काम करता है
.home {
margin: 0 auto;
}
.home .center {
margin: 0 auto;
text-align: center;
}
.arrow
margin: 0 auto;
}
चीयर्स!
उत्तर के लिए 1 № 4
यह काम करना चाहिए, यह प्रयास करें।
.home {
margin: 0 auto;
height: 100%;
width: 100%;
position: absolute;
margin: 0 auto;
max-width: 960px;
}
.center {
position: relative;
bottom: 0;
top:30px;
text-align: center;
}
.arrow
left: 0;
right: 0;
एक स्पष्टीकरण के रूप में यह क्यों काम करता है: ठीक है, आवरण div निरपेक्ष होना चाहिए, और इसकी सामग्री को स्थिति के सापेक्ष होना चाहिए कि आप आवरण के अंदर क्या है जैसा कि आप कृपया। इस तरह से, यदि आप आगे रिश्तेदार div जोड़ना चाहते हैं तो आपके लिए आसान हो जाएगा
उत्तर के लिए 1 № 5
इसे इस्तेमाल करे:
HTML कोड:
<div class="home">
<div class="center">
<a class="arrow fa fa-long-arrow-down fa-3x" href="#"></a>
</div>
</div>
सीएसएस कोड:
.home {
margin: 0 auto;
height: 100%;
width: 100%;
position: relative;
margin: 0 auto;
max-width: 960px;
}
.home .center {
position: absolute;
bottom: 0;
top:30px;
text-align: center;
}
.arrow {
}