使用我自己的“自定义”列表中的BacckgroundSCSS中的随机渐变

问题描述

我想在网站背景的不同区域中使用一些自己的渐变组合。

我希望他们每次页面刷新时更改

我已经使用2个变量以不同的步调对梯度角度进行了不同程度的编码

$ primary-color

$ secondary-color

现在,在我的# Underlying data tmp <- mpg %>% group_by(class,manufacturer) %>% summarise(models=n()) # Works as expected tmp %>% plot_ly(x=~manufacturer,y=~models,group=~class,type="scatter",color=~class,colors = scales::hue_pal()(length(n_distinct(tmp$class))),#ggplot colors mode="lines+markers") # Issue with markers > idea behind is to have a white center and a marker line with the same color as the line itself tmp %>% plot_ly(x=~manufacturer,colors = scales::hue_pal()(n_distinct(tmp$class)),marker = list(color = 'rgba(255,255,1)',line = list(color = scales::hue_pal()(n_distinct(tmp$class)))),mode="lines+markers") 文件中,我希望获得随机的一对原色和第二色作为这些变量值。

渐变组合:

  1. #ffafbd→#ffc3a0

  2. #2193b0→#6dd5ed

  3. #cc2b5e→#753a88

我希望用户每次刷新或新用户进入我的网站时,都以不同的variables.scss标签(我在上面应用了渐变代码)作为背景来体验上述任一渐变

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)