html - 如何使图形向右对齐
问题描述
我想将一个图形元素向右对齐,我尝试了浮动并且它工作但我无法清除浮动所以还有其他方法吗?
<figure>
<img src="https://images.unsplash.com/photo-1596070779006-15d9c5ff73d7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60" alt="">
</figure>
解决方案
figure {
display: flex;
justify-content: flex-end;
}
推荐阅读
- r - 如何结合系统发育树和热图?
- c++ - GCC ARM 交叉编译,诸如 undefined reference to `__cxa_end_catch@CXXABI_1.3' 之类的错误表示什么?
- google-app-engine - `go build -mod vendor` 无法使用 vendored 包
- wpf - WPF MVVM:整数的组合框高度不同
- java - 创建具有一般固定标题的 JPEG 拇指图像
- javascript - 无法从云函数中的文档中获取数据(返回未定义)
- c++ - 当指针指向的对象被另一个类的实例删除时重新分配指针
- .net - 正则表达式获取 HTML 标签之间的值
- file - 在其上下文生命周期中使用 Apache Camel 仅读取 1 个文件
- java - 无法将 Mysql 与 Spring 工具套件连接?