<a href="/faq" title="FAQ" class="article-container">
<div class="article">
<img src="/images/logo.png" alt="текст">
<span class="text">FAQ</span>
<span class="text-hover">text text</span>
</div>
</a>
.article-container {
display: block;
position: relative;
width: 100px;
height: 100px;
border: 1px solid #ccc;
color: #fff;
}
.article {
color: #000;
}
.text{
}
.text-hover {
visibility: hidden;
}
.article-container:hover .text{
display: none;
}
.article-container:hover .text-hover {
visibility: visible;
}
try:
edits_photo["photo"]=msg.document.file_id
os.chdir("bot/edit_photo")
file_id=edits_photo["photo"]
k=(await bot.download_file_by_id(file_id))
img = Image.open(k)
img = img.filter(ImageFilter.BLUR)
img.save(str(num) + ".png")
img.show()
f=open(str(num) +".png", "rb")
await msg.reply_photo(f)
os.remove(str(num) + ".png")
except ValueError:
pass
except FileNotFoundError:
file_id=edits_photo["photo"]
k=(await bot.download_file_by_id(file_id))
img = Image.open(k)
img = img.filter(ImageFilter.CONTOUR)
img.save(str(num) + ".png")
img.show()
f=open(str(num) +".png", "rb")
await msg.reply_photo(f)
os.remove(str(num) + ".png")
class set_photo(StatesGroup):
photo=State()
@dp.message_handler(commands="test")
async def test(msg:types.Message, state: FSMContext):
await msg.answer("введите слово")
await set_photo.photo.set()#установка состояния
#стадия из первого деспетчера
@dp.message_handler(state=set_photo.photo)
async def something (msg:types.Message, state: FSMContext):
async with state.proxy() as data:
data["text"]=msg.text
await msg.answer(f"ваш текст {data["text"]} ")