css 手写返回箭头

因为在开发App时,为了自定义返回栏,返回箭头,一般都用图片,当图片不方便,最好用css样式实现。

逻辑:
画出一个正方形,让它旋转45度,只显示你需要的两个边即可

代码

<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport"
        content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,initial-scale=1">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-status-bar-style" content="white">
    <meta name="apple-mobile-web-app-capable" content="no">
    <title>Css arrow</title>
</head>
<style type="text/css">
    #triangle-facing-right {
        display: inline-block;
        margin: 72px;
        border-right: 24px solid;
        border-bottom: 24px solid;
        width: 120px;
        height: 120px;
        transform: rotate(-45deg);
    }

    #triangle-facing-left {
        display: inline-block;
        margin: 72px;
        border-left: 24px solid;
        border-bottom: 24px solid;
        width: 120px;
        height: 120px;
        transform: rotate(45deg);
    }
</style>

<body>
    <div id="triangle-facing-right"></div>
    <div id="triangle-facing-left"></div>
</body>



</html>

 

相关推荐

  1. css 返回箭头

    2024-04-08 10:40:02       11 阅读
  2. “ 选择排序 ”

    2024-04-08 10:40:02       33 阅读
  3. 爬虫框架

    2024-04-08 10:40:02       46 阅读
  4. 一个vuex?

    2024-04-08 10:40:02       37 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-08 10:40:02       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-08 10:40:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-08 10:40:02       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-08 10:40:02       20 阅读

热门阅读

  1. 【告警监控】监控,巡检和拨测

    2024-04-08 10:40:02       13 阅读
  2. Unity LayoutRebuilder 强制UI重新布局

    2024-04-08 10:40:02       12 阅读
  3. wpf viewmodel和界面双向通知

    2024-04-08 10:40:02       10 阅读
  4. tx-lcn使用

    2024-04-08 10:40:02       13 阅读
  5. WPF —— FromTo/By动画

    2024-04-08 10:40:02       11 阅读
  6. C#WPF控件Menu详解

    2024-04-08 10:40:02       12 阅读
  7. Springboot启动过程

    2024-04-08 10:40:02       15 阅读
  8. Docker设置时区

    2024-04-08 10:40:02       18 阅读
  9. opencv x86(32位) windows下vs2019编译问题

    2024-04-08 10:40:02       13 阅读
  10. 数据结构 实验报告11

    2024-04-08 10:40:02       14 阅读
  11. 设计模式详解(十三)——享元模式

    2024-04-08 10:40:02       14 阅读