float does not work in a flex container
问题 I want to position text (foo link) in right of the footer element. I need footer display to remain flex . But when I set it to flex , float:right for span doesn't work anymore. <footer style="display: flex;"> <span style="text-align: right;float: right;"> <a>foo link</a> </span> </footer> https://jsfiddle.net/dhsgvxdx/ 回答1: The float property is ignored in a flex container. From the flexbox specification: 3. Flex Containers: the flex and inline-flex display values A flex container establishes