简体   繁体   English

Css:元素漂浮在firefox上的Image上,但不在其他浏览器中。 firefox是否遵循CSS标准或其他浏览器?

[英]Css: An element is floating over an Image on firefox but not in other browsers. Is firefox respecting css standards or are the other browsers?

Like in the title, I have this: 就像标题一样,我有这个:

http://jsfiddle.net/Eddie84/vh6n4/ http://jsfiddle.net/Eddie84/vh6n4/

Is firefox respecting css standards or are the other browsers? firefox是否遵循CSS标准或其他浏览器? And, how can I have the same result on other browsers without changing the DOM and not twisting the css?! 而且,如何在不更改DOM且不扭曲CSS的情况下在其他浏览器上获得相同的结果?

HTML: HTML:

<div>
    <h2>
        <a href="#">Lorem Ipsum</a>
    </h2>
    <p>Lorem ipsum. dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis. Lorem ipsum. dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis.</p>

<h4>Lorem ipsum. dolor sit amet, consectetuer adipiscing elit.</h4>
    <a class="circle" href="#">
        <span>Lorem</span> <br />
        <span>
            <img alt="" src="http://lorempixel.com/50/50" />
        </span>
    </a>

    <p>Lorem ipsum. dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis</p>
    <p>
        <img style="display:block; width:100%" alt="" src="http://www.menucool.com/slider/prod/image-slider-4.jpg" />
    </p>
    <p>Lorem ipsum. dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis</p>
</div>

CSS: CSS:

.circle {
    float:right;
    border-radius: 50%;
    box-shadow: 3px 3px 1px rgba(0, 0, 0, 0.5);
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    height: 110px;
    line-height: 1.4;
    padding: 10px;
    position: relative;
    text-align: center;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
    width: 110px;
    background:red;
}

Thank you very much 非常感谢你

Serafino 塞拉菲诺

its not firefox bug..you just din use clear as you use float so you must use clear:both then you can see that your code is working..check my code.. 它不是firefox的错误..您只是在使用float时使用了clear,所以必须使用clear:两者都可以看到您的代码正在工作..检查我的代码..

<p>Lorem ipsum. dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis. Lorem ipsum. dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis.</p>

<h4>Lorem ipsum. dolor sit amet, consectetuer adipiscing elit.</h4>

    <a class="circle" href="#">
        <span>Lorem</span> <br />
        <span>
            <img alt="" src="http://lorempixel.com/50/50" />
        </span>
    </a>

    <p>Lorem ipsum. dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis</p>
    <div style="clear:both;"></div>

    <p>
        <img style="display:block; width:100%" alt="" src="http://www.menucool.com/slider/prod/image-slider-4.jpg" />
    </p><div style="clear:both;"></div>
    <p>Lorem ipsum. dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis</p>

evn if i will use display:block or not but circle image wont overflow on another..i hope you will like my ans..thanx :) EVN,如果我将使用display:block或不,但圆形图像不会在另一个..我希望你会喜欢我的ans..thanx :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 纯HTML / CSS图像滑块在其他浏览器上看起来与firefox不同 - Pure HTML/CSS image slider looks different on other browsers than firefox firefox,chrome和其他浏览器中的图像映射支持 - Image map support in firefox, chrome and other browsers 图片 <option>适用于Firefox,但不适用于其他浏览器 - Image for <option> works in firefox but not works in other browsers 其他浏览器中的CSS错误 - CSS error in other browsers CSS&#39;clear:both;“不适用于IE7浏览器。IE8/ IE9,Firefox,Chrome等都没有问题 - CSS 'clear:both;" not working as expected for IE7 browsers. No problems in IE8/IE9, Firefox, Chrome, etc HTML,CSS动画:漂浮在iPhone Safari上,与其他浏览器不同 - HTML, CSS-Animation: floating on iphone safari not like in other browsers CSS幻灯片不再在Firefox中起作用; 在所有其他浏览器中闪烁 - CSS slideshow doesn't work in Firefox anymore; blinks in all other browsers Firefox正在加载css但没有应用。 我尝试过其他浏览器并且所有浏览器都运行良好 - Firefox is loading css but not applying. I tried other browsers and all of them working well 除IE以外的所有其他浏览器的CSS - css for all other browsers but IE 该网站可以在Firefox中运行,但没有其他浏览器,为什么? - site works in firefox but no other browsers, why?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM