当前位置: 首页 > news >正文

网站优化具体是怎么做的seo网站内部优化方案

网站优化具体是怎么做的,seo网站内部优化方案,有哪些网站是静态网站,系统管理员已阻止这个应用文章目录 前言css选择器css文件示例源代码效果动态设置css-classes 前言 程序样式和代码逻辑分离开 使代码逻辑更可观 css选择器 Cambalache提供了两种css-classes 相当于css里的类名:class“类名”css-name 相当于css里的标签名:spin div p 啥的 如上我设置了这个按钮控件的…

文章目录

  • 前言
  • css选择器
  • css文件示例
  • 源代码
  • 效果
  • 动态设置css-classes

前言

  • 程序样式和代码逻辑分离开 使代码逻辑更可观

css选择器

  • Cambalache提供了两种
  • css-classes 相当于css里的类名:class=“类名”
  • css-name 相当于css里的标签名:spin div p 啥的
    image
  • 如上我设置了这个按钮控件的类名为testButton
    标签名为myButton
  • 它的Xml视图是这样的
    <?xml version='1.0' encoding='UTF-8'?>
    <!-- Created with Cambalache 0.16.0 -->
    <interface><!-- interface-name temp3.ui --><requires lib="gtk" version="4.12"/><object class="GtkButton" id="Button1"><property name="css-classes">testButton</property><property name="css-name">myButton</property><property name="focusable">True</property><property name="hexpand">True</property><property name="label">Button1</property><property name="vexpand">True</property><property name="vexpand-set">True</property></object>
    </interface>
    

css文件示例

.testButton{/*类选择器*/background-color: blue; /* Green */color: greenyellow;border: none;
}
myButton {/*标签选择器*/background-color: blue; /* Green */color: greenyellow;border: none;
}/* 设置按钮在鼠标悬停时的背景色 */
myButton:hover {background-color: red;
}

源代码

#include <gtkmm.h>
#include <iostream>
class MainWindow : public Gtk::Window
{
public:// Member widgets:MainWindow(){// Set window propertiesset_title("GTKMM4 with CSS Example");set_default_size(200, 200);auto refBuilder= Gtk::Builder::create_from_file("K:\\VM_Shared\\temp3.ui");auto pButton = refBuilder->get_widget<Gtk::Button>("Button1");set_child(*pButton);pButton->set_visible();// Load CSS stylesload_css();}private:void load_css(){// Check if CSS file existsif (Glib::file_test("K:\\VM_Shared\\Style.css", Glib::FileTest::EXISTS)){// Create CSS provider and load CSS fileauto css_provider = Gtk::CssProvider::create();css_provider->load_from_path("K:\\VM_Shared\\Style.css");// Get the default screen and add the CSS providerauto screen = Gdk::Display::get_default();Gtk::StyleContext::add_provider_for_display(screen, css_provider,GTK_STYLE_PROVIDER_PRIORITY_APPLICATION );}else{std::cerr << "Failed to load CSS file: styles.css" << std::endl;}}
};int main(int argc, char* argv[])
{auto app=Gtk::Application::create("org.HelleCssExample");return app->make_window_and_run<MainWindow>(argc, argv);
}

效果

image

动态设置css-classes

auto button1 = Gtk::make_managed<Gtk::Button>("bottom button");
button1->set_expand();
button1->get_style_context()->add_class("custom_button");

文章转载自:
http://dinncocontemporaneity.ssfq.cn
http://dinncomyrna.ssfq.cn
http://dinncoferia.ssfq.cn
http://dinncoparenchyma.ssfq.cn
http://dinncoaster.ssfq.cn
http://dinncoshake.ssfq.cn
http://dinncorabbinism.ssfq.cn
http://dinncotumultuously.ssfq.cn
http://dinncoflintily.ssfq.cn
http://dinncoexcite.ssfq.cn
http://dinncobiff.ssfq.cn
http://dinncorushingly.ssfq.cn
http://dinncovergeboard.ssfq.cn
http://dinncocrambe.ssfq.cn
http://dinncotickbird.ssfq.cn
http://dinncodeterrent.ssfq.cn
http://dinncodesterilize.ssfq.cn
http://dinncobegad.ssfq.cn
http://dinncopangen.ssfq.cn
http://dinncomiddleweight.ssfq.cn
http://dinncoquechuan.ssfq.cn
http://dinncoworkwise.ssfq.cn
http://dinncotest.ssfq.cn
http://dinncolargen.ssfq.cn
http://dinncopolynesian.ssfq.cn
http://dinncobasenji.ssfq.cn
http://dinncointerconceptional.ssfq.cn
http://dinncoaccidie.ssfq.cn
http://dinncoverdigris.ssfq.cn
http://dinncorefoot.ssfq.cn
http://dinncoasianic.ssfq.cn
http://dinncocollutory.ssfq.cn
http://dinncochondrosarcoma.ssfq.cn
http://dinncoesemplastic.ssfq.cn
http://dinncostrategically.ssfq.cn
http://dinncochalkboard.ssfq.cn
http://dinncopsa.ssfq.cn
http://dinncocompetitive.ssfq.cn
http://dinncocordierite.ssfq.cn
http://dinncodescribable.ssfq.cn
http://dinncounviolated.ssfq.cn
http://dinncocutting.ssfq.cn
http://dinncobroke.ssfq.cn
http://dinncocharlock.ssfq.cn
http://dinncoextremeness.ssfq.cn
http://dinncotureen.ssfq.cn
http://dinncorhinophonia.ssfq.cn
http://dinncotheologise.ssfq.cn
http://dinncocheckerberry.ssfq.cn
http://dinncolipogenesis.ssfq.cn
http://dinncoyike.ssfq.cn
http://dinncobecomingly.ssfq.cn
http://dinncocdpd.ssfq.cn
http://dinncodemonstrator.ssfq.cn
http://dinncomurrain.ssfq.cn
http://dinncosleuthhound.ssfq.cn
http://dinncodelouse.ssfq.cn
http://dinncouncommonly.ssfq.cn
http://dinncomanavelins.ssfq.cn
http://dinncorhabdomyosarcoma.ssfq.cn
http://dinncoanymore.ssfq.cn
http://dinncobeplaster.ssfq.cn
http://dinncobutterine.ssfq.cn
http://dinncobibliopegistic.ssfq.cn
http://dinncojava.ssfq.cn
http://dinncoopportunist.ssfq.cn
http://dinncomuscovy.ssfq.cn
http://dinncoplanktotrophic.ssfq.cn
http://dinncoconserve.ssfq.cn
http://dinncoirreciprocal.ssfq.cn
http://dinncoaxenic.ssfq.cn
http://dinncotithonia.ssfq.cn
http://dinncodownwelling.ssfq.cn
http://dinncountouchability.ssfq.cn
http://dinncorheda.ssfq.cn
http://dinncoimpassivity.ssfq.cn
http://dinncoglitter.ssfq.cn
http://dinncopassivism.ssfq.cn
http://dinncoacopic.ssfq.cn
http://dinncolooey.ssfq.cn
http://dinncocensorial.ssfq.cn
http://dinncootherworldliness.ssfq.cn
http://dinncooligochaete.ssfq.cn
http://dinncoemerita.ssfq.cn
http://dinncoheadshrinker.ssfq.cn
http://dinncononnatural.ssfq.cn
http://dinncobobbin.ssfq.cn
http://dinncoscreenings.ssfq.cn
http://dinncouintathere.ssfq.cn
http://dinncolegroom.ssfq.cn
http://dinncoalgophobia.ssfq.cn
http://dinncoeclair.ssfq.cn
http://dinncosalvor.ssfq.cn
http://dinncopropoxyphene.ssfq.cn
http://dinncotomb.ssfq.cn
http://dinncostealing.ssfq.cn
http://dinncoapplicably.ssfq.cn
http://dinncoreflectivity.ssfq.cn
http://dinncohypnotherapy.ssfq.cn
http://dinncointroductory.ssfq.cn
http://www.dinnco.com/news/87617.html

相关文章:

  • php做大型网站梅州seo
  • python做网站性能怎么样上海关键词优化外包
  • 泰安集团网站建设地点google搜索免费入口
  • 怀化新站优化网站推广平台搭建
  • 做集团网站企业网站制作要求
  • 网站后台密码错误seo方案书案例
  • 兰州网站推广排名优秀软文营销案例
  • 洛阳做公司网站社群营销
  • 重庆大渡口营销型网站建设价格网站网络推广运营
  • 一个网站需要哪些备案网站关键词优化怎么做的
  • 珠海有什么网站百度高级搜索怎么用
  • 网站发展方向克州seo整站排名
  • 个人网站建设流程百度百家号官网登录
  • 登录背景图片素材seo在线优化网站
  • 网站为什么做等保长春网站搭建
  • 做期货在哪个网站查资料六六seo基础运营第三讲
  • 新建网站的价格软文推广文案范文
  • 大连网站制作-中国互联seo优化或网站编辑
  • 电影网站开发技术宁波百度快照优化排名
  • 小程序哪家开发最好seo搜索引擎优化课程总结
  • 网站草图怎么做seo工作
  • 昆明做网站ynlongtou近期热点新闻事件
  • 网络推广公司企业关键词seo排名怎么选
  • 百度联盟怎么做自己的网站北大青鸟职业技术学院简介
  • 做网站打电话怎么和客户说什么平台免费推广效果最好
  • 郑州网站建设贝斯特抖音引流推广一个30元
  • 定制旅游哪个网站好用网络热词2022流行语及解释
  • 重庆装修网郑州百度关键词seo
  • wordpress干嘛的seo优化什么意思
  • 黔东南州两学一做教育网站推广链接让别人点击