汉堡式折叠html,美味的CSS动画汉堡包:hamburgers_html/css_WEB-ITnose

article/2025/11/6 22:39:36

s if you insist, but they’re not accessible as a menu button.

Append the class name of the type of hamburger you’re craving:

Here’s the list of hamburger-type classes you can choose from: hamburger--arrowhamburger--arrow-rhamburger--arrowalthamburger--arrowalt-rhamburger--boringhamburger--collapsehamburger--collapse-rhamburger--elastichamburger--elastic-rhamburger--emphatichamburger--emphatic-rhamburger--sliderhamburger--slider-rhamburger--spinhamburger--spin-rhamburger--squeezehamburger--vortexhamburger--vortex-r

Note: -r classes are reverse variants (e.g. hamburger--spin spins clockwise whereas hamburger--spin-r spins counterclockwise.

Trigger the active state by appending class name is-active:

Since the class name would have to be toggled via JavaScript and implementation would differ based on the context of how you plan on using the hamburger, I’m going to leave the rest up to you.

Sass

I’ve also included .scss source files if you use Sass as your CSS precompiler. It’s customizable and modular.

Download and unzip the source files.

Copy the files from the _sass/hamburgers directory into your project.

Import the hamburgers.scss file in your Sass manifest file:

@import "path/to/hamburgers";

Customize your hamburger and/or remove any types you don’t want in hamburgers.scss.

Compile your Sass*, and voila!

Hamburgers is also available on npm and Bower. npm install hamburgersbower install css-hamburgers

* Be sure to run the CSS through Autoprefixer since the Sass doesn’t account for vendor prefixes.

Customization

Here is the full list of default settings (found in _sass/hamburgers/hamburgers.scss);

$hamburger-padding-x : 15px !default;$hamburger-padding-y : 15px !default;$hamburger-layer-width : 40px !default;$hamburger-layer-height : 4px !default;$hamburger-layer-spacing : 6px !default;$hamburger-layer-color : #000 !default;$hamburger-layer-border-radius : 4px !default;$hamburger-hover-opacity : 0.7 !default;$hamburger-hover-transition-duration : 0.15s !default;$hamburger-hover-transition-timing-function: linear !default;// To use CSS filters as the hover effect instead of opacity,// set $hamburger-hover-use-filter as true and// change the value of $hamburger-hover-filter accordingly.$hamburger-hover-use-filter: false !default;$hamburger-hover-filter : opacity(50%) !default;

To override any default settings, you can change the value(s) within hamburgers.scss, but I recommend you declare your new settings separately:

@import "path/to/hamburgers";$hamburgers-padding-x: 20px;$hamburgers-padding-y: 15px;

You can also create a separate file (e.g. hamburgers-settings.scss) with those declarations, then import it along with Hamburgers:

@import "path/to/hamburgers";@import "hamburgers-settings"

ems or rems

Wanna work with ems or rems instead of px? Just change all the px values to the unit of your choice. Note: Be consistent (all px or all ems), otherwise it may break—the math behind the customization will fail if it attempts to perform operations with values of different units.

Not satisfied?

Dig into _base.scss or types/ and customize to your heart’s content. Fair warning: It‘s pretty delicate and may break, especially if you tweak the animations themselves.

Accessibility

Hamburger menu icons can be useful in the right context, but they’re not the most accessible.

ARIA will help make it accessible to people with disabilities.

If you insist on using

s, by default they’re not focusable (i.e. via keyboard or assistive technology). Add the tabindex attribute alongside ARIA.

A label can help make it more obvious that it toggles a menu.

Menu

Here are some resources on web accessibility and ARIA.

Browser Support

Animations use CSS3 3D transforms (translate3d whenever possible for GPU acceleration), which is supported by most browsers (not supported by IE9 and older and Opera Mini). For detailed browser support, check caniuse.com.

项目地址: https://github.com/jonsuh/hamburgers

1428d0e076c3959ab11d28a39bc84fab.png

5268f80b9b1e01f982625ef6fac83ca1.png

本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉

本文系统来源:php中文网


http://chatgpt.dhexx.cn/article/FgkiLqFH.shtml

相关文章

LSB 题解

今天来刷一道Misc的题目,LSB原理进行图片隐写 LSB原理 LSB是一种利用人类视觉的局限性设计的幻术 PNG和BMP图片中的图像像素一般是由RGB(RED红 GREEN绿 BLUE蓝)三原色组成 记住,JPG图片是不适合使用LSB隐写的,JPG图片对像数进行了有损压缩…

LSB利器-zsteg

一、Usage # zsteg -h Usage: zsteg [options] filename.png [param_string] -c, --channels X channels (R/G/B/A) or any combination, comma separated valid values: r,g,b,a,rg,bgr,rgba,r3g2b3,... -l, --limi…

【linux】lsb_release -a命令

查看linux发行版本:lsb_release -a 运行该命令时若提示lsb_release命令不存在 不存在,则表明系统未安装该命令,报错如下: 解决方法: 查看 lsb_release 命令属于哪个软件包,命令为yum provides */lsb_rel…

图片LSB隐写(java)

一、隐写原理 LSB隐写原理就是图片中的像素一般是由三种颜色组成,即三原色(红绿蓝)。由这三种原色可以组成其他各种颜色,在png图片的存储中,每个颜色占有8bit,即有256种颜色,一共包含256的三次方颜色,即16777216中颜色。人类的眼睛…

LSB隐写术

前言 LSB全称为 least significant bit,是最低有效位的意思。Lsb图片隐写是基于lsb算法的一种图片隐写术,以下统称为lsb隐写,这是一种常见的信息隐藏方法。当然关于图像的隐写的方法有很多,统称为隐写术, lsb隐写很实…

Linux开发标准LSB简介:Linux Standard Base

目录 Unix/Linux 标准化历史 POSIX Open Group Austin Group LSB LSB 简介 组织架构 工作组 LSB 的标准化流程 认证 认证问题报告 LSB 的历史、现状和将来 实例:lsb_release 的规范定义和实现 结束语 Unix/Linux 标准化历史 标准化目前已经成为 Linu…

LSB 简介

Unix/Linux 标准化历史 标准化目前已经成为 Linux 系统上的一个热门话题。实际上,在 Linux 诞生之初,这个问题就得到了重视。当 Linus 在开发 0.01 版本的 Linux 内核时,就开始关注 POSIX 标准的发展,他在 /include/unistd.h 文件…

图片隐写之LSB(Least Significant Bit)原理及其代码实现

1. 什么是隐写? 隐写术是一门关于信息隐藏的技巧与科学,所谓信息隐藏指的是不让除预期的接收者之外的任何人知晓信息的传递事件或者信息的内容。隐写术的英文叫做Steganography,来源于特里特米乌斯的一本讲述密码学与隐写术的著作Steganogra…

MetaPhlAn2:宏基因组物种组成分析

简介 MetaPhlAn2是分析微生物群落(细菌、古菌、真核生物和病毒)组成的工具,它在宏基因组研究中非常有用,只需一条完命令即可获得微生物的物种丰度信息(扩增子物种组成需要质控、拼接、拆样本、切除引物、比对等步骤,此软件居然分析宏基因组这…

你想要的宏基因组-微生物组知识全在这(2023.4)

欢迎点击上方蓝色”宏基因组”关注我们! 宏基因组/微生物组是当今世界科研最热门的研究领域之一,为加强宏基因组学技术和成果交流传播,推动全球华人微生物组领域发展,中科院青年科研人员创立“宏基因组”公众号,联合海…

Kraken2:宏基因组快速物种注释神器

简介 kraken是基于k-mer精确比对,并采用最LCA投票结果快速宏基因组DNA序列进行物种注释的软件。 图. Kraken2分类基本原理 该文章于2014年发表于Genome Biology,目前引用过两千次[1]。详见《Kraken:使用精确比对的超快速宏基因组序列分类软件…

Nature综述: 宏基因组关联分析-深入研究微生物组

本文由谢忠杰编译,董小橙、江舜尧编辑,本文较长,建议用电脑阅读。 “微生太”原创微文,转载已获授权。 导读 问题1:哪些疾病与人体微生物明确相关? 问题2:如何研究人体微生物与健康的关系&#…

Nature子刊:HUMAnN2实现宏基因组和宏转录组种水平功能组成分析

HUMAnN2实现宏基因组和宏转录组种水平功能组成分析 Species-level functional profiling of metagenomes and metatranscriptomes Nature Methods, [IF 26.919], Article, 2018-10-30 DOI: http://dx.doi.org/10.1038/s41592-018-0176-y 第一作者:Eric A. Franzosa…

从测序到宏基因组:聚焦菌群生信分析方法最前沿

今天是第2439期日报。 Nature子刊:基于三代测序的宏基因组分析助力完整微生物进化研究 Nature Methods[IF:47.99] ① 基于Pacific Biosciences或Oxford Nanopore的三代测序技术已成为获得闭环微生物基因组的常规手段,即使对特殊大量数据的读取&#xff0…

Protein Cell:扩增子和宏基因组数据分析实用指南

扩增子和宏基因组数据分析实用指南 A practical guide to amplicon and metagenomic analysis of microbiome data Protein Cell [IF: 10.164] DOI: https://doi.org/10.1007/s13238-020-00724-8 Review: 2020-5-11 第一作者:刘永鑫1,2,3, 秦媛1,2,3,4, 陈同5 通讯作…

凌恩生物文献分享|颠覆性的宏基因组新思路,速来get!

非人灵长类动物(NHP)是人类的近亲,为宿主-微生物互作的研究提供了一个很好的例子。近年来研究主要集中在野生灵长类动物的肠道微生物群,这将有助于了解灵长类及其肠道微生物群的进化,但仍然缺乏关于野生种群肠道微生物…

Nature综述:宏基因组测序研究耐药基因的方法和资源

本文转自红皇后学术,链接 https://mp.weixin.qq.com/s/2QMrq6hwr4mIPSpe_rfXJg 论文信息 论文题目:Sequencing-based methods and resources to study antimicrobial resistance 期刊:Nature Reviews Genetics IF:35.898 发表时间…

Nature综述:鸟枪法宏基因组-从取样到数据分析——2万字带你系统入门宏基因组实验和分析

文章目录 NBT:鸟枪法宏基因组-从取样到数据分析热心肠日报摘要正文图1. 宏基因组分析流程概述附图1. 用于规划宏基因组学研究的示例工作流程附框1. 实验设计中的问题和解决方案鸟枪法宏基因组学研究方案设计样本采集和DNA提取表1. 在测序之前富集微生物细胞和DNA方法…

宏基因组TPM定量

在RNA-Seq分析中,为了获取基因表达量差异,于是产生了RPKM、FPKM、TPM定量方法,去除测序深度和基因长度的影响。RPKM用于单端测序;FPKM用于双端测序。而TPM计算方法类似于RPKM,但更具有优势,是目前使用的较多…

你想要的宏基因组-微生物组知识全在这(2023.01)

欢迎点击上方蓝色”宏基因组”关注我们! 宏基因组/微生物组是当今世界科研最热门的研究领域之一,为加强宏基因组学技术和成果交流传播,推动全球华人微生物组领域发展,中科院青年科研人员创立“宏基因组”公众号,联合海…