springboot bootcdn使用示例詳解
應(yīng)用:直接使用bootcdn提供的靜態(tài)資源,不需要本地存儲
bootcdn 官網(wǎng):https://www.bootcdn.cn/
staticfile cdn官網(wǎng): http://www.staticfile.org/
常用靜態(tài)資源
# layui.jshttps://cdn.bootcdn.net/ajax/libs/layui/2.6.8/layui.jshttps://cdn.bootcdn.net/ajax/libs/layui/2.6.8/layui.min.js # layui.css//unpkg.com/layui@2.6.8/dist/css/layui.csshttps://www.layuicdn.com/layui-v2.6.8/css/layui.css # jqueryhttps://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.jshttps://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js # bootstraphttps://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.2/css/bootstrap-grid.csshttps://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.2/css/bootstrap-grid.min.css # reacthttps://cdn.bootcdn.net/ajax/libs/react-is/0.0.0-experimental-6f3fcbd6f-20210730/cjs/react-is.development.jshttps://cdn.bootcdn.net/ajax/libs/react-is/0.0.0-experimental-6f3fcbd6f-20210730/cjs/react-is.development.min.js # vuehttps://cdn.bootcdn.net/ajax/libs/vue/3.2.0-beta.7/vue.cjs.jshttps://cdn.bootcdn.net/ajax/libs/vue/3.2.0-beta.7/vue.cjs.min.js
*********************
示例
***************
配置文件
cdn.properties
layui=https://cdn.bootcdn.net/ajax/libs/layui/2.6.8/layui.min.jsjquery=https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js
***************
前端頁面
index.html
<!DOCTYPE html><html lang='en' xmlns:th='http://www.thymeleaf.org'><head> <meta charset='UTF-8'> <title>Title</title> <script th:src='http://www.lshqa.cn/bcjs/${application.jquery}'></script> <script th:src='http://www.lshqa.cn/bcjs/${application.layuijs}'></script> <link rel='stylesheet' th:href='http://www.lshqa.cn/bcjs/${application.layuicss}'> <!-- <script>$(function (){ $('#btn').click(function (){alert('hello world'); })}) </script>--> <script>layui.use(’layer’,function (){ var layer=layui.layer; $('#btn').click(function (){$('#1').html('瓜田李下<br>'); layer.msg(’hello’) })}) </script></head><body><div th:align='center'> <span style='background-color: purple;font-size: large'></span><br> <button class='layui-btn'>點(diǎn)擊一下</button></div></body></html>
*********************
到此這篇關(guān)于springboot bootcdn使用的文章就介紹到這了,更多相關(guān)springboot bootcdn內(nèi)容請搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!
相關(guān)文章:
1. python實(shí)現(xiàn)讀取類別頻數(shù)數(shù)據(jù)畫水平條形圖案例2. JS中map和parseInt的用法詳解3. 使用Spry輕松將XML數(shù)據(jù)顯示到HTML頁的方法4. PHP循環(huán)與分支知識點(diǎn)梳理5. CSS可以做的幾個令你嘆為觀止的實(shí)例分享6. ASP基礎(chǔ)入門第三篇(ASP腳本基礎(chǔ))7. 使用css實(shí)現(xiàn)全兼容tooltip提示框8. CSS3實(shí)現(xiàn)動態(tài)翻牌效果 仿百度貼吧3D翻牌一次動畫特效9. ASP動態(tài)網(wǎng)頁制作技術(shù)經(jīng)驗(yàn)分享10. Javaweb工程運(yùn)行報(bào)錯HTTP Status 404解決辦法
