Get element style in vue

  1. vue uses this.$refs.name.style to get introverted styles, not css styles
  2. I would like to ask you how to get the style written in css? For example, background-color.
  3. trouble to write the code, not just which attribute to use, it"s too vague.
Mar.25,2021

clipboard.png


pseudo demand.

vue is data-driven, which means you should be able to get the information you want from the data element style .


if your requirement is to add or replace styles, bind class


change your way of thinking earlier. Instead of getting elements to change styles like jquery, vue treats styles as an object, or uses a variable to control styles

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ff48-2c4e0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ff48-2c4e0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?