这是针对Wordpress
function solve(arr){
let asc = arr.every(function (x, i) {
return i === 0 || x >= arr[i - 1];
});
let desc = arr.every(function (x, i) {
return i === 0 || x <= arr[i - 1];
});
if (asc){
return "A"
}
if (desc){
return "D"
}
if (!asc || !desc){
arr.forEach(function(el, i){
let rtdAsc = "RA"
let rtdDesc = "RD"
let ascFind = arr.find(function(el, i){
return el >= arr[i - 1]
})
let descFind = arr.find(function(el, i){
return el <= arr[i - 1];
})
if (ascFind && descFind){
if (el === ascFind && arr[i] === el && arr[i+1] > ascFind){
return rtdAsc
// console.log("RA")
} else if (el === ascFind && arr[i] === el && arr[i+1] < ascFind){
return rtdDesc
}
}
})
}
}
~~~~~~~~~~~
I expect the result of invoking the example `solve([4,5,6,1,2,3]);` to result in "RA" through return statements, as it does successfully through `console.log("RA");`
答案 0 :(得分:1)
在header.scss第8行中,用我的CSS替换。这将解决您的问题。
.awe-header--transparent.awemenu-standard:not(.awemenu-sticky) {
top: 0;
width: 100% !important;
position: absolute;
background-color: transparent;
left: 0px;
}