tianyun před 2 roky
rodič
revize
0ecdf4ae8b
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      simple-demo/js/util.js

+ 1 - 1
simple-demo/js/util.js

@@ -41,7 +41,7 @@ axios.interceptors.response.use(function (response) {
 function my_tip(string) {
     const div = document.createElement("div");
     div.setAttribute("id", "my_alert_danger");
-    div.setAttribute("style", "position: fixed; width: 30%; margin-left: 30%; z-index: 2000;");
+    div.setAttribute("style", "position: fixed; width: 30%; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2000; background-color:green");
     div.innerHTML = string;
 
     document.body.prepend(div);