Icons missing in jQuery UI

2020-05-22 04:56发布

I'm using Modal Form and Widgets from jQuery, but the icons does not appear. for eg the Cross (X) and Plus-Minus (+-) Icons.

When I load the page I et these errors.

"NetworkError: 404 NOT FOUND - http://127.0.0.1:8000/static/css/images/ui-bg_flat_75_ffffff_40x100.png"
ui-bg_...100.png

"NetworkError: 404 NOT FOUND - http://127.0.0.1:8000/static/css/images/ui-icons_222222_256x240.png"
ui-ico...240.png

"NetworkError: 404 NOT FOUND - http://127.0.0.1:8000/static/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png"
ui-bg_...100.png

So, I downloaded the images, put it into the path specified, but then the +- icons appear twice at the extreme right and moreover only the column1 widgets are minimized. The Close X icon still not appears. Where I'm going wrong?

I would also like to know how to add remove widgets functionality?

11条回答
何必那么认真
2楼-- · 2020-05-22 05:24

You need downbload the jQueryUI, this contains de images that you need

enter link description here

查看更多
劫难
3楼-- · 2020-05-22 05:28

Having the right CSS and JS libraries helps, this solved it for me

<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.12.4.js"></script>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
查看更多
等我变得足够好
4楼-- · 2020-05-22 05:34

Yeah I had the same problem and it was driving me crazy because I couldn't find the image.

This may help you out...

  1. Look for a CSS file in your directories called jquery-ui.css
  2. Open it up and search for ui-bg_flat_75_ffffff_40x100.png.

You will then see something like this...

.ui-widget-content {
    border: 1px solid #aaaaaa;
    background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
    color: #222222;
}

And comment out the background and save the CSS document. Or you can set an absolute path to that background property and see if that works for you. (i.e. background: #ffffff url(http://.../image.png);

Hope this helps

查看更多
家丑人穷心不美
5楼-- · 2020-05-22 05:37

I met a similar error after adding jQuery-ui-tooltip component using bower. It downloads js + css files only, so I had to manually add images.

A good source to find all the images (for all standard themes) is this CDN.

查看更多
登录 后发表回答