For the complete documentation index, see llms.txt. This page is also available as Markdown.

html classlist

原生JS增删查html classlist

const htmlNode = document.getElementsByTagName('html')[0]
const classList = htmlNode.classList

classList.contains('is-clipped')
classList.add('is-clipped')
classList.remove('is-clipped')

最后更新于