小编Joe*_*oe 的帖子

取消将鼠标悬停在图像上的部分模糊

我一直在尝试使图像看起来模糊,但是当鼠标悬停在鼠标上时,它会清除光标指向的那一点。与www.canva.com网站非常相似。

到目前为止,这是我的代码,它不能100%工作。我正在使用HTML,CSS和Javascript。不幸的是,我是javascript新手!

HTML:

<!doctype html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>QuoteWall</title>
        <link rel="stylesheet" type="text/css" href="style.css">
        <link rel="stylesheet" type="text/javascript" href="javascript.js">
    </head>
<body>
<div class="pic">
    <svg class="blur" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%">
        <image filter="url(#filter2)" xlink:href="image.png" width="100%" height="100%"></image>
        <filter id="filter2">
            <feGaussianBlur stdDeviation="5" />
        </filter>
        <mask id="mask1">
            <circle cx="-50%" cy="-50%" r="30" fill="white" filter="url(#filter2)" />
        </mask>
        <image xlink:href="image.png" width="100%" height="100%" mask="url(#mask1)"></image>
    </svg>
</div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

CSS:

body {
    margin: 0;
}
.pic {
    text-align: center;
    position: relative;
    height: 250px;
}
.blur {
    height: 100%; …
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery image

2
推荐指数
1
解决办法
1649
查看次数

DatabaseException:Class缺少没有参数的构造函数

我正在尝试从我的firebase数据库中检索数据并在ListView中的TextViews中显示它.但是,我在这一行上遇到了"缺少构造函数"的异常:Clients clients = clientsSnapshot.getValue(Clients.class);.

这是完整的例外: 在此输入图像描述

不知道如何解决它.我在firebase或android开发方面都不是很有经验,所以任何帮助都会非常感激.干杯啦!

public class ViewProfile extends AppCompatActivity{

    ListView listviewClients;
    List<Clients> clientsList;

    DatabaseReference databaseClients;

    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view_profile);

        listviewClients = (ListView) findViewById(R.id.listviewClients);
        databaseClients = FirebaseDatabase.getInstance().getReference("clients");

        clientsList = new ArrayList<>();
    }

    @Override
    protected void onStart() {
        super.onStart();

        databaseClients.addValueEventListener (new ValueEventListener() {


            @Override
            public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
                clientsList.clear();

                for (com.google.firebase.database.DataSnapshot clientsSnapshot : dataSnapshot.getChildren()) {
                    Clients clients = clientsSnapshot.getValue(Clients.class);

                    clientsList.add(clients);
                }
                ClientsList adapter = new ClientsList(ViewProfile.this, clientsList);
                listviewClients.setAdapter(adapter);
            }

            @Override
            public void onCancelled(DatabaseError databaseError) { …
Run Code Online (Sandbox Code Playgroud)

android exception firebase firebase-realtime-database

1
推荐指数
1
解决办法
3144
查看次数